<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>

<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>olap4j Specification</title>

<style type="text/css">
CODE {
    font-family: 'courier new', monospace;
    font-size: 80%;
    font-weight: bold;
    color: maroon;
}
A.javadoc {
    font-family: 'courier new', monospace;
    font-size: 80%;
    font-weight: bold;
    color: maroon;
    text-decoration: underline;
}
A:hover.javadoc, A:active.javadoc {
    color: black;
    text-decoration: underline;
}
DIV.code {
    font-family: 'courier new', monospace;
    font-size: 80%;
    font-weight: bold;
    color: maroon;
    background-color: #e0e0e0;
    margin-left: 20;
    margin-right: 20;
    border-style: solid;
    border: solid #000000 1px;
    border-width: 1px;
    padding: 4px;
}
DIV.note {
    background-color: #e0e0e0;
    margin-left: 20;
    margin-right: 20;
    border-style: solid;
    border: solid #000000 1px;
    border-width: 1px;
    padding: 4px;
}
IMG.std {
    border: solid #000000 1px;
    border-color: #000000;
    margin-left: 20;
    margin-right: 20;
}
TABLE {
    margin-left: 20;
    margin-right: 20;
    border: solid #000000 1px;
    border-color:#888888;
    border-collapse: collapse;
    cellspacing:1;
    cellpadding:1;
}
TABLE TH {
    border: solid #000000 1px;
    font-size:100%;
    text-align:left;
    vertical-align:top;
    background-color:#d0d0d0;
}

TABLE TD {
    border: solid #808080 1px;
    font-size:100%;
    vertical-align:top;
}
</style></head><body>

<h1>olap4j Specification</h1>

<p>Authors: Julian Hyde, Barry Klawans<br/>
Version: 1.0<br/>
History: see <a href="https://github.com/olap4j/olap4j/commits/master/doc/olap4j_fs.html">log</a><br/>
Last modified: April 9<sup>th</sup>, 2011.</p>

<hr noshade="noshade">
<h2><a name="Contents">Contents</a></h2>
<ol>

  <li><a href="#Introduction">Introduction</a>
    <ol>
      <li><a href="#A_brief_history_of_OLAP_standards">A brief history
of OLAP standards</a></li>
      <li><a href="#Overview_of_olap4j">Overview of olap4j</a></li>
      <li><a href="#Relationship_to_other_standards">Relationship to
other standards</a>
        <ol>
          <li><a href="#olap4j_and_XMLA">olap4j and XML/A</a></li>
          <li><a href="#olap4j_is_built_on_other_standards">olap4j is
built on other standards</a></li>
        </ol>
      </li>
      <li><a href="#Benefits_of_a_standard_Java_API_for_OLAP">Benefits
of a standard Java API for OLAP</a></li>
      <li><a href="#Architecture_of_olap4j">Architecture of olap4j</a></li>
      <li><a href="#Compatibility">Compatibility</a></li>
      <li><a href="#Compliance_levels">Compliance levels</a></li>
    </ol>
  </li>
  <li><a href="#Components_of_the_API">Components of the API</a>
    <ol>
      <li><a href="#Driver_management">Driver management</a>
        <ol>
          <li><a href="#The_Driver_class">The Driver class</a></li>
          <li><a href="#The_DriverManager_class">The DriverManager class</a></li>
          <li><a href="#The_DataSource_interface">The DataSource
interface</a></li>
          <li><a href="#The_OlapDataSource_interface">The
OlapDataSource interface</a></li>
          <li><a href="#The_OlapException_class">The OlapException class</a></li>
        </ol>
      </li>
      <li><a href="#Connections">Connections</a>
        <ol>
          <li><a href="#Connection_pooling">Connection pooling</a></li>
          <li><a href="#OlapConnection">The OlapConnection interface</a></li>
          <li><a href="#The_OlapWrapper_interface">The OlapWrapper
interface</a></li>
          <li><a href="#The_OlapDatabaseMetaData_interface">The
OlapDatabaseMetaData interface</a></li>
        </ol>
      </li>
      <li><a href="#Statements">Statements</a>
        <ol>
          <li><a href="#OlapStatement">The OlapStatement interface</a></li>
          <li><a href="#PreparedOlapStatement">The
PreparedOlapStatement interface</a></li>
          <li><a href="#OlapParameterMetaData">The
OlapParameterMetaData interface</a></li>
          <li><a href="#CellSet">The CellSet interface</a></li>
          <li><a href="#CellSetAxis">The CellSetAxis interface</a></li>
          <li><a href="#The_Axis_enum">The Axis enum</a></li>
          <li><a href="#The_CellSetAxisMetaData_interface">The
CellSetAxisMetaData interface</a></li>
          <li><a href="#The_Position_interface">The Position interface</a></li>
          <li><a href="#Cell">The Cell interface</a></li>
          <li><a href="#The_CellSetMetaData_interface">The
CellSetMetaData interface</a></li>
        </ol>
      </li>
      <li><a href="#MDX_object_model">MDX parse tree model</a>
        <ol>
          <li><a href="#The_ParseTreeWriter_class">The ParseTreeWriter
class</a></li>
        </ol>
      </li>
      <li><a href="#MDX_parser">MDX parser</a></li>
      <li><a href="#MDX_type_model">MDX type model</a></li>
      <li><a href="#Metadata">Metadata</a>
        <ol>
          <li><a href="#Access_control">Access control</a></li>
          <li><a href="#Metadata_objects">Metadata objects</a>
            <ol>
              <li><a href="#MetadataElement">The MetadataElement
interface</a></li>
              <li><a href="#Database">The Database interface</a></li>
              <li><a href="#Catalog">The Catalog interface</a></li>
              <li><a href="#Schema">The Schema interface</a></li>
              <li><a href="#Cube">The Cube interface</a></li>
              <li><a href="#Dimension">The Dimension interface</a></li>
              <li><a href="#Hierarchy">The Hierarchy interface</a></li>
              <li><a href="#Level">The Level interface</a></li>
              <li><a href="#Member">The Member interface</a></li>
              <li><a href="#Measure">The Measure interface</a></li>
              <li><a href="#Property">The Property interface</a></li>
              <li><a href="#NamedSet">The NamedSet interface</a></li>
              <li><a href="#Datatype">The Datatype enum</a></li>
            </ol>
          </li>
          <li> <a href="#The_OlapDatabaseMetaData_interface_and_methods_which_return_schema_rowsets">The
OlapDatabaseMetaData interface, and schema result sets</a>
            <ol>
              <li><a href="#getDatabases">The getDatabases method</a></li>
              <li><a href="#getDatabaseProperties">The
getDatabaseProperties method</a></li>
              <li><a href="#getLiterals">The getLiterals method</a></li>
              <li><a href="#getCubes">The getCubes method</a></li>
              <li><a href="#getDimensions">The getDimensions method</a></li>
              <li><a href="#getFunctions">The getFunctions method</a></li>
              <li><a href="#getHierarchies">The getHierarchies method</a></li>
              <li><a href="#getLevels">The getLevels method</a></li>
              <li><a href="#getMeasures">The getMeasures method</a></li>
              <li><a href="#getMembers">The getMembers method</a></li>
              <li><a href="#getProperties">The getProperties method</a></li>
              <li><a href="#getSets">The getSets method</a></li>
            </ol>
          </li>
          <li><a href="#Other_methods">Other methods</a></li>
        </ol>
      </li>
      <li><a href="#Transform">Transform</a>
      <ol>
        <li><a href="#Query_Model_Details">Query model details</a></li>
        <li><a href="#Navigation_Actions">Navigation actions</a>
        <ol>
          <li><a href="#Slicing_navigations">Slicing navigations</a></li>
          <li><a href="#Restructuring_navigations">Restructuring
navigations</a></li>
          <li><a href="#Drilling_navigations">Drilling navigations</a></li>
          <li><a href="#Scoping_navigations">Scoping navigations</a></li>
        </ol>
        </li>
        <li><a href="#Open_Nav_Issues">Open issues</a></li>
      </ol>
      </li>
      <li><a href="#Layout">Layout</a></li>
      <li><a href="#Scenarios">Scenarios</a></li>
      <li><a href="#Notifications">Notifications</a></li>
      <li><a href="#Drill_through">Drill through</a></li>
    </ol>
  </li>
  <li><a href="#Other_topics">Other topics</a>
    <ol>
      <li><a href="#Internationalization">Internationalization</a></li>
      <li><a href="#Concurrency_and_thread-safety">Concurrency and
thread-safety</a></li>
      <li><a href="#Canceling_statements">Canceling statements</a></li>
    </ol>
  </li>
  <li><a href="#Other_components">Other components</a>
    <ol>
      <li><a href="#Test_suite">Test suite</a></li>
      <li><a href="#XML/A_provider">XML/A provider</a></li>
    </ol>
  </li>
  <li><a href="#Non-functionality">Non-functionality</a></li>
  <li><a href="#Related_projects">Related projects</a>
    <ol>
      <li><a href="#Mondrian_provider">Mondrian provider</a></li>
      <li><a href="#XMLA_provider_project">XML for Analysis provider</a></li>
      <li><a href="#Other_data_sources">Other data sources</a></li>
    </ol>
  </li>
  <li><a href="#Opportunities_for_specification">Appendix A.
Opportunities for specification</a></li>
  <li><a href="#Feedback">Appendix B. Feedback</a></li>
  <li><a href="#Open_issues">Appendix C. Open issues</a></li>
  <li><a href="#Miscellaneous">Appendix D. Miscellaneous</a></li>
  <li><a href="#References">Appendix E. References</a></li>
  <li><a href="#Change_log">Appendix F. Change log</a></li>
</ol>

<h2>1. <a name="Introduction">Introduction</a></h2>

<p>olap4j is an open Java API for building OLAP applications.</p>

<p>In essence, olap4j is to multidimensional data what JDBC is for relational data.
olap4j has a similar programming model to JDBC, shares some of its core classes,
and has many of the same advantages. You can write an OLAP application in Java
for one
server (say Mondrian) and easily switch it to another (say Microsoft Analysis
Services, accessed via XML for Analysis).</p>

<p>However, creating a standard OLAP API for Java is a contentious issue. To
understand why, it helps to understand the history of OLAP standards.</p>

<h3>1.1. <a name="A_brief_history_of_OLAP_standards">A brief history of OLAP standards</a></h3>

<p>History is strewn with attempts to create a standard OLAP API. First, the OLAP council's
MDAPI (in two versions), then the JOLAP API emerged from Sun's Java Community
Process. These all failed, it seems, because at some point during the
committee stages, all of the OLAP server vendors concerned lost
interest in releasing an implementation of the standard. The standards were
large and complex, and no
user-interface provider stepped forward with a UI which worked with multiple
back-ends.</p>

<p>Meanwhile, Microsoft introduced OLE DB for OLAP (which works only between
Windows clients and servers), and then XML/A (XML for Analysis, a web-services
API). These standards were more successful, for a variety of reasons. First,
since the standards (OLE DB for OLAP in particular) were mainly driven by one
vendor, they were not a compromise attempting to encompass the functionality of
several products. Second, there was a ready reference implementation, and
Microsoft saw to it that there were sufficient OLAP clients to make these
standards viable forums for competition and innovation. Third, there was the MDX
query language. A query language is easier to explain than an API. It leaves
unsolved the problem of how to construct queries to answer business questions,
but application developers could solve that problem by embedding one of the
off-the-shelf OLAP clients.</p>

<p>The Open Source community has been developing a taste for OLAP. First there was Mondrian, an open-source OLAP
server; then there was JPivot, a client which first spoke to Mondrian, then also
to XML/A; then there were more OLAP clients, and applications which wanted to
use a particular client, but wanted to talk to a variety of servers; and
companies using a particular OLAP server that wanted to get at it from several
clients. It became clear the open-source OLAP tools needed a standard, and that
standard would probably be suitable for other Java-based OLAP tools.</p>

<h3>1.2. <a name="Overview_of_olap4j">Overview of olap4j</a></h3>

<p>An OLAP application interacts with an OLAP server by means of MDX statements
belonging to connections. The statements are defined in terms of metadata and
validated according to a type system, and some applications are built at a
higher level, manipulating MDX parse trees, and defining complex queries in
terms that a business user can understand. The olap4j API provides all of these
facilities.</p>

<p>At the lowest level, olap4j has a framework for registering <b>drivers</b>,
and managing the lifecycle of <b>connections and statements</b>. olap4j provides
this support by extending the JDBC framework.</p>

<p>A key decision in the design of an OLAP API is whether to include a <b>query
language</b>. Historically, it has been a contentious one. The previous
standards fell into two camps: MDAPI and JOLAP had an API for building queries,
while OLE DB for OLAP and XML/A had the MDX query language. The SQL query
language is an essential component of relational database APIs such as ODBC and
JDBC, and it makes similar sense to base an OLAP API on a query language such as
MDX. But OLAP applications also need to <b>build and transform queries</b> as
the end-user explores the data. So, olap4j embraces both approaches: you can
create a query by parsing an MDX statement, you can build a query by
manipulating an MDX parse tree, and an MDX parser library allows you to easily
convert an MDX string to and from a parse tree.</p>

<p><b>Metadata </b>is at the heart of olap4j. You can browse the cubes,
dimensions, hierarchies, members in an OLAP schema, and an MDX parse tree and
query result are tied back to the same metadata objects. There is also a <b>type
system </b>for describing expressions.</p>

<p>olap4j makes it possible to write an OLAP client without starting from scratch.
In addition to the MDX parser, and operations on the MDX parse tree, there is a
higher-level query model, which includes <b>operations to transform queries</b>
(also called 'navigations'), and facilities to layout multidimensional results as HTML tables.</p>

<p>There are experimental modules in olap4j for <b>scenarios</b> (also
called 'what-if' analysis, or 'writeback') and <b>notifications</b>,
pushed from the server to the client when the data set on the server
changes.</p>

<h3>1.3. <a name="Relationship_to_other_standards">Relationship to
other standards</a></h3>

<h4>1.3.1. <a name="olap4j_and_XMLA">olap4j and XML/A</a></h4>

<p>At this point, you may be saying: what about XML/A? XML/A was here first, is an
open standard, and is supported by a number of servers. Is olap4j an attempt to
replace XML/A? Isn't XML/A good enough for everyone?</p>

<p>olap4j certainly has some similarities with XML/A. Both APIs allow
an application to execute OLAP queries, and to browse the metadata of
an OLAP schema. But XML/A is a
low-level web-services API which leaves a lot of work to the
application writer.
(Witness the fact that the majority of successful XML/A applications
run only on
Windows, where the ADOMD.NET is a high-level interface to XML/A
servers.)
The APIs are mostly complementary, because olap4j can be easily
added to an XML/A back-end, and provides features which would be
difficult or
impossible to provide via a web-services API. These are functions for
parsing MDX, building and transforming MDX query models, and mapping
result sets into
graphical layouts such as pivot tables.</p>

<p>If a web-services based application needs these functions, it can use the
XML/A provider to connect to the underlying data source, execute queries, and
browse metadata, but can still use olap4j's features for MDX parsing, query
models and layout.</p>

<p>The metamodels of olap4j and XML/A are similar. Both contain
schemas, cubes, dimensions, et cetera. Where possible, olap4j uses the
same terminology for entity and attribute names. This simplifies the
job of creating an XML/A driver for olap4j, and also makes possible an
XML/A -to-olap4j bridge (a server that answers XML/A requests by
querying an underlying olap4j data source).</p>

<h4>1.3.2. <a name="olap4j_is_built_on_other_standards">olap4j is
built on other
standards</a></h4>
<p>Where possible, olap4j leverages existing standards. This has several
advantages. First, an end-user familiar with the existing standards can come up
to speed with olap4j quickly. For instance, creating a connection and executing
a statement should be straightforward to anyone familiar with JDBC connections,
statements and result sets work.</p>
<p>If an OLAP server implementor has already implemented a driver for one
standard, then it should be less work to implement an olap4j driver. This
clearly applies to the MDX language (borrowed from XML/A and OLE DB for OLAP).
Implementation schema result sets should be straightforward if the server
already supports XML/A schema rowsets.</p>
<p>If olap4j is sufficiently similar to an existing standard, tools designed for
use with that standard may be applicable to olap4j also. For instance, one goal
of olap4j is that people will be able to use connection-pooling libraries such
as <a href="http://jakarta.apache.org/commons/dbcp/">Jakarta Commons DBCP</a>,
<a href="http://sourceforge.net/projects/c3p0">C3P0</a>. (This presents some
challenges because olap4j extends some of the JDBC interfaces, but we hope to
solve them.)</p>
<p>Lastly, reusing an existing standard is less work for the authors of the new
standard!</p>
<p>Sometimes the standards conflict. ADOMD exposes its metadata through an
object model, whereas JDBC and XML/A expose metadata relationally, via what
XML/A calls rowsets and what we and JDBC call result sets. In this case, we
chose to do both, because of the diversity of needs of olap4j clients. Metadata
objects allow you to integrate query results with metadata using much fewer
code: positions can reference members, and you can navigate from a member to its
hierarchy, and so forth. Likewise, metadata objects can be used in building MDX
parse trees. But if a client tool wants to maintain its own metadata cache,
schema rowsets are more flexible and efficient.</p>

<h3>1.4. <a name="Benefits_of_a_standard_Java_API_for_OLAP">Benefits of a standard Java API for OLAP</a></h3>

<p>Once the olap4j standard is in place, we can expect that the familiar
benefits of an open standard will emerge: a larger variety of tools, better
tools, and more price/feature competition between OLAP servers. These benefits
follow because if a developer of OLAP tool can reach a larger audience, there is greater
incentive to build new tools.</p>

<p>Eventually there will be olap4j providers for most OLAP servers. The server
vendors will initially have little incentive to embrace a standard which will
introduce competition into their market, but eventually the wealth of tools will
compel them to write a provider; or, more likely, will tempt third-party or
open-source efforts to build providers for their servers.</p>

<h3>1.5. <a name="Architecture_of_olap4j">Architecture of olap4j</a></h3>

<p>The following diagram shows how olap4j fits into an enterprise architecture.</p>

<img class="std" alt="olap4j architecture" src="olap4j-arch.png"/>

<h3>1.6. <a name="Compatibility">Compatibility</a></h3>

<p>olap4j requires JDK 1.5 or higher, in particular because it uses the generics
and enum features introduced in JDK 1.5.0.</p>

<p>olap4j works best against JDK 1.6 or higher, because it makes use of the
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/Wrapper.html">java.sql.Wrapper</a>
interface. In earlier Java versions, the same functionality
is available by casting objects to the built-in
<a class="javadoc" href="api/org/olap4j/OlapWrapper.html">OlapWrapper</a> interface.</p>

<p>JDK 1.4 compatibility will be available on demand, using the
<a href="http://retroweaver.sourceforge.net/">Retroweaver</a> utility. This will
consist of a retrowoven JAR file, <code>olap4j-jdk1.4.jar</code> and
retroweaver's runtime library <code>retroweaver-rt-1.2.4.jar</code>. (See
<a href="#JDK">design note</a>.)</p>

<p>olap4j's JDBC support is consistent with JDBC version 3.0 (which was introduced in JDK 1.4 and
is also in JDK 1.5) and also with JDBC version 4.0 (introduced in JDK 1.6).</p>

<h3>1.7. <a name="Compliance_levels">Compliance levels</a></h3>

<p>There are two compliance levels to which a driver can support olap4j. olap4j
is a rich specification, and it takes a considerable effort to implement it
fully, but applications can still be built on a driver which only implements the
core parts of the specification. The lower level allows a vendor to a subset of
the specification without the significant investment of a fully-compliant
driver.</p>

<p>The compliance levels are as follows:</p>

<ul>
    <li><b>olap4j Core Compliance</b>. To comply with the olap4j core
    specification, it must implement all classes in the <code>org.olap4j</code>
    package, with the exception of the <code>get<i>Xxxx</i>s()</code> methods in
    <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html">
    OlapDatabaseMetaData</a> that return result sets, and all classes in the
    <code>org.olap4j.metadata</code> package. The OLAP server must also
    implement the fundamental features of the MDX language (see below).</li>
    <li><b>olap4j Full Compliance</b>. To fully comply with the olap4j
    specification, a driver must comply with the core requirements, plus
    implement the
    <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html">
    OlapDatabaseMetaData</a>.<code>get<i>Xxxx</i>s()</code> methods, plus
    implements an MDX parser and validator (<code>org.olap4j.mdx.parser</code>
    package).</li>
</ul>

<h4><a name="MDX_language_compliance">MDX language compliance</a></h4>

<p>All olap4j drivers must implement the fundamental features of the
MDX language, but olap4j compliance levels do not imply a particular
degree of support for the MDX language.</p>

<p>The fundamental features of MDX are:</p>

<ul>
    <li>Queries of the form &quot;SELECT ... FROM ... WHERE&quot;.</li>
    <li>The set constructor operator { ... }.</li>
    <li>Set functions CrossJoin(&lt;Set&gt;, &lt;Set&gt;), Filter(&lt;Set&gt;, &lt;Condition&gt;),
    Order(&lt;Set&gt;, &lt;Expression&gt;), Hierarchize(&lt;Set&gt;).</li>
    <li>Navigation operators &lt;Member&gt;.Children, &lt;Level&gt;.Members
    &lt;Hierarchy&gt;.Members, &lt;Member&gt;.Parent, Level, Hierarchy, Dimension</li>
    <li>Aggregation functions Aggregate</li>
    <li>Basic arithmetic and logical operators</li>
</ul>

<p align="left">Of course, a provider may implement a larger subset of MDX, and
most do. A provider can describe its MDX compliance level by describing the
additional features it supports (e.g. WITH MEMBER, WITH SET, NON EMPTY, and
HAVING clauses in queries; virtual cubes; and calculated members and sets
defined against cubes) and additional functions and operators implemented.</p>

<h2>2. <a name="Components_of_the_API">Components of the API</a></h2>

<p>We now describe the olap4j API in more detail, by breaking it down into a set
of functional areas.</p>

<img class="std" alt="olap4j components" src="olap4j-comp.png" width="740" height="692">

<h3>2.1. <a name="Driver_management">Driver management</a></h3>

<p>olap4j shares JDBC's driver management facilities. This allows olap4j clients
to leverage the support for JDBC such as
connection pooling, driver registration.</p>

<p>Classes:</p>

<ul>

  <li><a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/Driver.html">java.sql.Driver</a></li>
  <li> <a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/DriverManager.html">java.sql.DriverManager</a></li>
  <li> <a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/javax/sql/DataSource.html">javax.sql.DataSource</a></li>
</ul>

<h4>2.1.1. <a name="The_Driver_class">The Driver class</a></h4>

<p>Same functionality as JDBC.</p>

<p>Here is an example of registering an olap4j driver:</p>

<div class="code">Class.forName("mondrian.olap4j.MondrianOlap4jDriver");</div>

<p>Note that this is the same as you would write for any JDBC driver.
From JDBC 4.0 (JDK 1.6) onwards, compliant JDBC drivers register
themselves
automatically by creating an entry in their JAR file's
<code>META-INF/services/java.sql.Driver</code> file.
Compliant olap4j drivers register themselves in the same way.</p>

<h4>2.1.2. <a name="The_DriverManager_class">The DriverManager class</a></h4>

<p>Same functionality as JDBC.</p>

<h4>2.1.3. <a name="The_DataSource_interface">The DataSource interface</a></h4>

<p>Same functionality as JDBC.</p>

<p>See also: <a href="#Database">Database</a>.</p>

<h4>2.1.4. <a name="The_OlapDataSource_interface">The OlapDataSource
interface</a></h4>

<p>Extension to <code>DataSource</code> that returns <code>OlapConnection</code>
objects rather than mere <code>java.sql.Connection</code> objects.</p>

<h4>2.1.5. <a name="The_OlapException_class">The OlapException class</a></h4>

<p><a class="javadoc" href="api/org/olap4j/OlapException.html">OlapException</a>
(extends
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/SQLException.html">java.sql.SQLException</a>)
describes an error which occurred while accessing an OLAP server.</p>

<p>Since olap4j extends JDBC, it is natural that OlapException should
extend JDBC's
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/SQLException.html">SQLException</a>.
The implementation by an olap4j driver of a JDBC method which is declared to throw a SQLException may,
if the driver chooses, throw instead an OlapException.</p>

<p>OlapException provides some additional information to help an OLAP
client identify the location of the error. The <code>context</code> is
the Cell or Position object where the error occurred. The <code>region</code>
is an object representing the textual region in the MDX statement.</p>

<p>Methods:</p>

<ul>
    <li><code>Region getRegion()</code></li>
    <li><code>void setRegion(Region region)</code></li>
    <li><code>Object getContext()</code></li>
    <li><code>void setContext(Object context)</code></li>
</ul>

<h3>2.2. <a name="Connections">Connections</a></h3>

<p>olap4j's connection management component manages connections to the OLAP server,
statements.</p>

<p>Where possible, olap4j uses JDBC's session management facility. olap4j defines extensions to
JDBC interfaces Connection and Statement.</p>

<p>For example, the following code registers a driver, connects to Mondrian and
executes a statement:</p>

<div class="code">
    import java.sql.*;<br/>
    import org.olap4j.*;<br/>
  <br/>
  Class.forName(&quot;mondrian.olap4j.MondrianOlap4jDriver&quot;);<br/>
      Connection connection =<br/>
&nbsp;&nbsp;&nbsp; DriverManager.getConnection(<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;jdbc:mondrian:Jdbc=jdbc:odbc:MondrianFoodMart;&quot;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + &quot;Catalog=/WEB-INF/queries/FoodMart.xml;&quot;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + &quot;Role='California manager'&quot;);<br/>
    OlapWrapper wrapper = (OlapWrapper) connection;<br/>
      OlapConnection olapConnection = wrapper.unwrap(OlapConnection.class);<br/>
      OlapStatement statement = olapConnection.createStatement();<br/>
  <br/>
      CellSet cellSet =<br/>
&nbsp;&nbsp;&nbsp; statement.executeOlapQuery(<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;SELECT {[Measures].[Unit
    Sales]} ON COLUMNS,\n&quot;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + &quot;&nbsp; {[Product].Members} ON
    ROWS\n&quot;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + &quot;FROM [Sales]&quot;);</div>

<p>Here's a piece of code to connect to Microsoft SQL Server Analysis
Services&#8482; (MSAS) via XML/A. Note that except for the driver class and connect
string, the code is identical.</p>

<div class="code">
    import java.sql.*;<br/>
    import org.olap4j.*;<br/>
    <br/>
    Class.forName(&quot;org.olap4j.driver.xmla.XmlaOlap4jDriver&quot;);<br/>
    Connection connection =<br/>
    &nbsp;&nbsp;&nbsp; DriverManager.getConnection(<br/>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;jdbc:xmla:Server=http://localhost/xmla/msxisapi.dll&quot;<br/>
    OlapWrapper wrapper = (OlapWrapper) connection;<br/>
      OlapConnection olapConnection = wrapper.unwrap(OlapConnection.class);<br/>
    OlapStatement statement = connection.createStatement();<br/>
    <br/>
    CellSet cellSet =<br/>
    &nbsp;&nbsp;&nbsp; statement.executeOlapQuery(<br/>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;SELECT {[Measures].[Unit
    Sales]} ON COLUMNS,\n&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + &quot;&nbsp; {[Product].Members}
    ON ROWS\n&quot;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + &quot;FROM [Sales]&quot;);</div>

<p>In the above examples, a statement was created from a string. As we shall
see, a statement can also be created from an MDX parse tree.</p>

<h4>2.2.1. <a name="Connection_pooling">Connection pooling</a></h4>

<p>Look again at the code samples in the previous section. One would
expect that it would be safe to downcast the result of a factory
method to the desired result. For example, if you invoke an <code>OlapConnection</code>'s
<code>createStatement()</code> method, the result should be an <code>
OlapStatement</code>.</p>

<p>But if you you are using a connection-pooling
library (common examples of which include <a href="http://jakarta.apache.org/commons/dbcp/">Jakarta Commons DBCP</a>
and
<a href="http://sourceforge.net/projects/c3p0">C3P0</a>), this is not so. Every
connection-pooling library tracks connections by wrapping them in another class,
and this class will implement <code>java.sql.Connection</code> but not <code>
OlapConnection</code>. To access methods of the <code>OlapConnection</code>, the
client application must first strip away the wrapper object.</p>

<p>If you are using a connection-pooling library, olap4j provides the
<a class="javadoc" href="api/org/olap4j/OlapWrapper.html">OlapWrapper</a>
interface with the method method <code>unwrap(Class)</code> to access the object underneath
the wrapped
connection. For instance, if you were using DBCP, you could define and use a
pooling olap4j data source as follows:</p>

<div class="code">import java.sql.*;<br/>
    import org.olap4j.*;<br/>
    import org.apache.commons.dbcp.*;<br/>
    <br/>
    GenericObjectPool connectionPool =<br/>
&nbsp;&nbsp;&nbsp; new GenericObjectPool(null);<br/>
    ConnectionFactory connectionFactory =<br/>
&nbsp;&nbsp;&nbsp; new DriverManagerConnectionFactory(<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &quot;jdbc:mondrian:Jdbc=jdbc:odbc:MondrianFoodMart;&quot;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    + &quot;Catalog=/WEB-INF/queries/FoodMart.xml;&quot;<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; + &quot;Role='California manager'&quot;,<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new Properties());<br/>
    PoolableConnectionFactory poolableConnectionFactory =<br/>
&nbsp;&nbsp;&nbsp; new PoolableConnectionFactory(<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; connectionFactory, connectionPool,
    null, null, false, true);<br/>
    DataSource dataSource =<br/>
&nbsp;&nbsp;&nbsp; new PoolingDataSource(connectionPool);<br/>
    <br/>
    // and some time later...<br/>
    <br/>
      Connection connection = dataSource.getConnection();<br/>
    OlapWrapper wrapper = (OlapWrapper) connection;<br/>
    OlapConnection olapConnection = wrapper.unwrap(OlapConnection.class);<br/>
      OlapStatement statement = olapConnection.createStatement();</div>

<p>The <a class="javadoc" href="api/org/olap4j/OlapStatement.html">OlapStatement</a>,
<a class="javadoc" href="api/org/olap4j/PreparedOlapStatement.html">PreparedOlapStatement</a>,
and <a class="javadoc" href="api/org/olap4j/CellSet.html">CellSet</a>
interfaces also extend <code>OlapWrapper</code>, and can be accessed similarly.</p>

<p>If connection pooling is not being used, then the object returned by the
driver will be an <code>OlapConnection</code> and will therefore trivially
implement <code>OlapWrapper</code> (because the <code>OlapConnection</code>
interface extends <code>OlapWrapper</code>). If connection pooling is being
used, the code will work provided that the implementer of the connection pool
has ensured that the pooled connection object implements the <code>OlapWrapper</code>
interface. This is a minor change to the connection pool, and we hope that
popular connection pools will utilize this method in the near future.</p>

<p>If you are using JDBC 4.0 (which is part of JDK 1.6 and later), the
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/Connection.html">java.sql.Connection</a>
class implements the
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/Wrapper.html">java.sql.Wrapper</a>
interface introduced in JDBC 4.0, so the code can be simplified:</p>

<div class="code">Connection connection = DriverManager.getConnection();<br/>
    OlapConnection olapConnection = connection.unwrap(OlapConnection.class);<br/>
      OlapStatement statement = olapConnection.createStatement();</div>

<p>Note that the <code>OlapWrapper</code> interface is not needed. This code
will work with any JDBC 4.0-compliant connection pool.</p>

<p>Package name: <a class="javadoc" href="api/org/olap4j/package-summary.html">org.olap4j</a></p>

<h4>2.2.2. <a name="OlapConnection">The OlapConnection interface</a></h4>

<p>
<a class="javadoc" href="api/org/olap4j/OlapConnection.html">OlapConnection</a>
(extends
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/Connection.html">java.sql.Connection</a>)
is a
connection to an OLAP data source.</p>

<p>
Methods:</p>

<ul>
  <li><code>String getDatabase()</code> // returns the name of the current database</li>
  <li><code>void setDatabase(String databaseName)</code> // sets this connection's current database</li>
  <li><code>Database getOlapDatabase()</code> // returns the current database</li>
  <li><code>NamedList&lt;Database&gt; getOlapDatabases()</code> // returns a list of all databases</li>
  <li><code>String getCatalog()</code> // returns the name of the current catalog (inherited from Connection)</li>
  <li><code>void setCatalog(String catalogName)</code> // sets this connection's current catalog</li>
  <li><code>Catalog getOlapCatalog()</code> // returns the current catalog object</li>
  <li><code>NamedList&lt;Catalog&gt; getOlapCatalogs()</code> // returns a list of all catalogs</li>
  <li><code>String getSchema()</code> // returns the name of the current schema</li>
  <li><code>void setSchema(String schemaName)</code> // sets this connection's current schema</li>
  <li><code>Schema getOlapSchema()</code> // returns the current schema object</li>
  <li><code>NamedList&lt;Schema&gt; getOlapSchemas()</code> // returns a list of all schemas</li>
  <li><code>OlapDatabaseMetaData getMetaData()</code> // returns an object that contains metadata about the database</li>
  <li><code>Locale getLocale()</code> // returns this connection's locale</li>
  <li><code>void setLocale(Locale locale)</code> // sets this connection's locale</li>
  <li><code>void setRoleName(String roleName)</code> // sets the name of the role in which access-control context this connection will execute queries</li>
  <li><code>String getRoleName()</code> // returns the name of the role in which access-control context this connection will execute queries</li>
  <li><code>List&lt;String&gt; getAvailableRoleNames()</code> // returns a list of role names available in this connection</li>
  <li><code>PreparedOlapStatement prepareOlapStatement(String mdx)</code> // prepares a statement</li>
  <li><code>createStatement createStatement(String mdx)</code> // creates a statement (overrides Connection method)</li>
  <li><code>Scenario createScenario()</code> // creates a scenario</li>
  <li><code>void setScenario(Scenario scenario)</code> // sets the current scenario for this connection</li>
  <li><code>Scenario getScenario()</code> // returns the current scenario for this connection</li>
  <li><code>MdxParserFactory getParserFactory()</code> // returns a factory to create MDX parsers</li>
</ul>

<h4>2.2.3. <a name="The_OlapWrapper_interface">The OlapWrapper interface</a></h4>

<p>
<a class="javadoc" href="api/org/olap4j/OlapWrapper.html">OlapWrapper</a>
provides the ability to retrieve a delegate instance when the instance in
question is in fact a proxy class.</p>
<p>
<code>OlapWrapper</code> duplicates the functionality of the
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/Wrapper.html">java.sql.Wrapper</a>
interface (introduced in JDBC 4.0), making this functionality available
to olap4j clients running in a JDBC 3.0 environment. For code which
will run only on JDBC 4.0 and later, <code>Wrapper</code> can be used,
and <code>OlapWrapper</code> can be ignored.</p>

<p>Methods:</p>

<ul>
  <li><code>boolean isWrapperFor(Class&lt;?&gt; iface)</code> //
returns true if this either implements the interface argument or is
directly or indirectly a wrapper for an object that does</li>
  <li><code>&lt;T&gt; T unwrap(Class&lt;T&gt;)</code> // returns an
object that implements the given interface</li>
</ul>

<h4>2.2.4. <a name="The_OlapDatabaseMetaData_interface">The OlapDatabaseMetaData interface</a></h4>

<p><a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html">
OlapDatabaseMetaData</a> (extends <a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html">
java.sql.DatabaseMetaData</a>) provides information about an OLAP
database.</p>

<p>Just as <a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html">
DatabaseMetaData</a> provides a method to query the each kind of
metadata element in a relational database (tables, columns, and so
forth), returning the rows as a
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/ResultSet.html">ResultSet</a>,
<code>OlapDatabaseMetaData</code> provides methods for OLAP metadata
elements (cubes, dimensions, hierarchies, levels, members, measures).</p>

<p>These methods are described in the section "<a href="#The_OlapDatabaseMetaData_interface_and_methods_which_return_schema_rowsets">The
<code>OlapDatabaseMetaData</code> interface and methods which return
schema rowsets</a>".</p>

<h3>2.3. <a name="Statements">Statements</a></h3>

<h4>2.3.1. <a name="OlapStatement">The OlapStatement interface</a></h4>

<p><a class="javadoc" href="api/org/olap4j/OlapStatement.html">OlapStatement</a>&nbsp;
(extends
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/Statement.html">java.sql.Statement</a>)
is an object used to execute a static MDX statement and return the
result it
produces.</p>

<p>It has methods to execute an MDX query represented both as a string and as a
parse tree.</p>

<p>Methods:</p>

<ul>
  <li><code>CellSet executeOlapQuery(String mdx)</code> // executes an MDX statement</li>
  <li><code>CellSet executeOlapQuery(SelectNode selectNode)</code> // executes an MDX statement expressed as a parse tree</li>
  <li><code>OlapConnection getConnection()</code> // returns the current connection (overrides Statement method)</li>
  <li><code>addListener(Granularity, CellSetListener)</code> // adds a listener to be notified of events to CellSets created by this statement</li>
</ul>

<h4>2.3.2. <a name="PreparedOlapStatement">The PreparedOlapStatement interface</a></h4>

<p><a class="javadoc" href="api/org/olap4j/PreparedOlapStatement.html">PreparedOlapStatement</a>
(extends
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html">java.sql.PreparedStatement</a>)
represents a precompiled MDX statement.</p>

<p>An MDX statement is precompiled and stored in a <code>PreparedOlapStatement</code>
object. This object can then be used to efficiently execute this statement
multiple times.</p>

<p>The method
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/PreparedStatement.html#getParameterMetaData%28%29">PreparedStatement.getParameterMetaData()</a>
returns a description of the
parameters, as in JDBC. The result is an OlapParameterMetaData.</p>

<p>To set values of parameters, use the <code>set<i>Type</i>(int, <i>type</i>)</code>
methods. If a parameter is a member, use the <code>setObject(int, Object)</code>
method; throws an exception if the object is not a member, or is a member of the
wrong hierarchy.</p>
<p>Unlike JDBC, it is not necessary to assign a value to every parameter. This
is because OLAP parameters have a default value. Parameters have their default
value until they are set, and then retain their new values for each subsequent
execution of this <code>PreparedOlapStatement</code>.</p>

<p>The
<a class="javadoc" href="api/org/olap4j/PreparedOlapStatement.html#getCube%28%29">getCube()</a>
method returns the cube (or virtual cube) the prepared statement
relates to.</p>

<p>Methods:</p>

<ul>
    <li><code>CellSet executeQuery()</code></li>
    <li><code>Cube getCube()</code></li>
    <li><code>CellSetMetaData getMetaData()</code></li>
    <li><code>OlapParameterMetaData getParameterMetaData()</code></li>
</ul>

<h4>2.3.3. <a name="OlapParameterMetaData">The OlapParameterMetaData interface</a></h4>

<p><a class="javadoc" href="api/org/olap4j/OlapParameterMetaData.html">OlapParameterMetaData</a>
(extends
<a class="javadoc"
href="http://download.oracle.com/javase/6/docs/api/java/sql/ParameterMetaData.html">java.sql.ParameterMetaData</a>)
describes parameters of a <code> PreparedOlapStatement</code>. Note that regular
JDBC parameters (bind variables) have ordinals but not names; olap4j parameters
have both ordinals and names.</p>

<p>Additional methods:</p>

<ul>
    <li><code>String getParameterName(int param)</code> // returns the designated parameter's name</li>
    <li><code>getParameterOlapType(int param)</code> // returns the designated parameter's OLAP type</li>
</ul>

<h4>2.3.4. <a name="CellSet">The CellSet interface</a></h4>

<p><a class="javadoc" href="api/org/olap4j/CellSet.html">CellSet</a>
(extends
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/ResultSet.html">java.sql.ResultSet</a>)
is the result of executing an <a class="javadoc" href="api/org/olap4j/OlapStatement.html">OlapStatement</a>
or <a class="javadoc" href="api/org/olap4j/PreparedOlapStatement.html">PreparedOlapStatement</a>.</p>
<p>It extends <code>ResultSet</code>, but since most of these methods are concerned with rows
and columns, only a few of the base class's methods are applicable. The following methods
are applicable:</p>

<ul>
  <li><a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/ResultSet.html#clearWarnings%28%29">clearWarnings()</a></li>
  <li><a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/ResultSet.html#close%28%29">close()</a></li>
  <li><a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/ResultSet.html#getConcurrency%28%29">getConcurrency()</a></li>
  <li><a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/ResultSet.html#getStatement%28%29">getStatement()</a></li>
  <li><a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/ResultSet.html#getType%28%29">getType()</a></li>
  <li><a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/ResultSet.html#getWarnings%28%29">getWarnings()</a></li>
</ul>

<p>Additional methods to retrieve the axes of the multidimensional
result:</p>

<ul>
  <li><code>List&lt;CellSetAxis&gt; getAxes()</code></li>
  <li><code>CellSetAxis getFilterAxis()</code></li>
  <li><code>Cell getCell(List&lt;Integer&gt; coordinates)</code></li>
</ul>

<p>An OlapStatement can have no more than one CellSet open. Closing an
OlapStatement, or preparing or executing a new query, implicitly closes
any previous CellSet.</p>

<h4>2.3.5. <a name="CellSetAxis">The CellSetAxis interface</a></h4>

<p>A <a class="javadoc" href="api/org/olap4j/CellSetAxis.html">CellSetAxis</a> is
an axis belonging to a <a class="javadoc" href="api/org/olap4j/CellSet.html">CellSet</a>.</p>

<p>A cell set has the same number of axes as the MDX statement which was
executed to produce it. For example, a typical cell set, resulting from an MDX
query with COLUMNS and ROWS expressions is two-dimensional, and therefore has
two axes.</p>

<p>Each axis is an ordered collection of members or tuples. Each member or tuple
on an axis is called a <a class="javadoc" href="api/org/olap4j/Position.html">Position</a>.</p>

<p>The positions on the cell set axis can be accessed sequentially or
random-access. Use the <code>List&lt;Position&gt; getPositions()</code> method to
return a list for random access, or the <code>Iterator&lt;Position&gt; iterate()</code>
method to obtain an iterator for sequential access.</p>

<p>Methods:</p>

<ul>
    <li><code>Axis getOrdinal()</code></li>
    <li><code>CellSet getCellSet()</code></li>
    <li><code>CellSetAxisMetaData getAxisMetaData()</code></li>
    <li><code>List&lt;Position&gt; getPositions()</code></li>
    <li><code>int getPositionCount()</code></li>
    <li><code>ListIterator&lt;Position&gt; iterate()</code></li>
</ul>

<h4>2.3.6. <a name="The_Axis_enum">The Axis enum</a></h4>

<p><a class="javadoc" href="api/org/olap4j/Axis.html">Axis</a> is an enumeration of axis types.</p>

<h4>2.3.7. <a name="The_CellSetAxisMetaData_interface">The CellSetAxisMetaData interface</a></h4>

<p>A <a class="javadoc" href="api/org/olap4j/CellSetAxisMetaData.html">
CellSetAxisMetaData</a> is
describes a <a class="javadoc" href="api/org/olap4j/CellSetAxis.html">
CellSetAxis</a>.</p>

<p>Methods:</p>

<ul>
    <li><code>Axis getAxis()</code></li>
    <li><code>List&lt;Hierarchy&gt; getHierarchies()</code></li>
    <li><code>List&lt;Property&gt; getProperties()</code></li>
</ul>

<h4>2.3.8. <a name="The_Position_interface">The Position interface</a></h4>

<p><a class="javadoc" href="api/org/olap4j/Position.html">Position</a>
is a position on a <a class="javadoc" href="api/org/olap4j/CellSetAxis.html">
CellSetAxis</a>.</p>
<p>An axis has a particular dimensionality, that is, a set of one or more
dimensions which will appear on that axis, and every position on that axis will
have a member of each of those dimensions. For example, in the MDX query</p>

<div class="code">
    SELECT {[Measures].[Unit Sales], [Measures].[Store Sales]} ON COLUMNS,<br/>
&nbsp;&nbsp;&nbsp; CrossJoin(<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {[Gender].Members},<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {[Product].[Food],
    [Product].[Drink]}) ON ROWS<br/>
    FROM [Sales]</div>

<p>the <code>COLUMNS</code> axis has dimensionality {<code>[Measures]</code>} and the <code>
ROWS</code>
axis has dimensionality {<code>[Gender]</code>, <code>[Product]</code>}. In the result
of this query,</p>
<blockquote>
    <table border="1" id="table1" cellpadding="3" summary="Query output">
        <tr>
            <td bgcolor="#E0E0E0"><b><i>Gender</i></b></td>
            <td bgcolor="#E0E0E0"><b><i>Product</i></b></td>
            <td bgcolor="#E0E0E0"><b>Unit Sales</b></td>
            <td bgcolor="#E0E0E0"><b>Store Sales</b></td>
        </tr>
        <tr>
            <td bgcolor="#E0E0E0"><b>All Gender</b></td>
            <td bgcolor="#E0E0E0"><b>Food</b></td>
            <td align="right">191,940</td>
            <td align="right">409,035.59</td>
        </tr>
        <tr>
            <td bgcolor="#E0E0E0"><b>All Gender</b></td>
            <td bgcolor="#E0E0E0"><b>Drink</b></td>
            <td align="right">24,597</td>
            <td align="right">48,836.21</td>
        </tr>
        <tr>
            <td bgcolor="#E0E0E0"><b>F</b></td>
            <td bgcolor="#E0E0E0"><b>Food</b></td>
            <td align="right">94,814</td>
            <td align="right">203,094.17</td>
        </tr>
        <tr>
            <td bgcolor="#E0E0E0"><b>F</b></td>
            <td bgcolor="#E0E0E0"><b>Drink</b></td>
            <td align="right">12,202</td>
            <td align="right">24,457.37</td>
        </tr>
        <tr>
            <td bgcolor="#E0E0E0"><b>M</b></td>
            <td bgcolor="#E0E0E0"><b>Food</b></td>
            <td align="right">97,126</td>
            <td align="right">205,941.42</td>
        </tr>
        <tr>
            <td bgcolor="#E0E0E0"><b>M</b></td>
            <td bgcolor="#E0E0E0"><b>Drink</b></td>
            <td align="right">12,395</td>
            <td align="right">24,378.84</td>
        </tr>
    </table>
</blockquote>
<p>each of the 5 positions on the <code>ROWS</code> axis has two members,
consistent with its dimensionality of 2. The <code>COLUMNS</code> axis has two
positions, each with one member.</p>

<p>Methods:</p>

<ul>
    <li><code>List&lt;Member&gt; getMembers()</code></li>
    <li><code>int getOrdinal()</code></li>
</ul>

<h4>2.3.9. <a name="Cell">The Cell interface</a></h4>

<p>A <a class="javadoc" href="api/org/olap4j/Cell.html">Cell</a> is
a cell returned from an <a class="javadoc" href="api/org/olap4j/CellSet.html">
CellSet</a>.</p>

<p>Methods:</p>

<ul>
  <li><code>CellSet getCellSet()</code></li>
  <li><code>int getOrdinal()</code></li>
  <li><code>List&lt;Integer&gt; getCoordinateList()</code></li>
  <li><code>Object getPropertyValue(Property)</code></li>
  <li><code>boolean isError()</code></li>
  <li><code>boolean isNull()</code></li>
  <li><code>boolean isEmpty()</code></li>
  <li><code>double getDoubleValue()</code></li>
  <li><code>String getErrorText()</code></li>
  <li><code>Object getValue()</code></li>
  <li><code>String getFormattedValue()</code></li>
</ul>

<h4>2.3.10. <a name="The_CellSetMetaData_interface">The
CellSetMetaData interface</a></h4>

<p><a class="javadoc" href="api/org/olap4j/CellSetMetaData.html">CellSetMetaData</a>
(extends <a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/ResultSetMetaData.html">
java.sql.ResultSetMetaData</a>) describes a
<a class="javadoc" href="api/org/olap4j/CellSet.html">CellSet</a>.</p>

<p>Methods:</p>

<ul>
    <li><code>NamedList&lt;Property&gt; getCellProperties()</code></li>
    <li><code>Cube getCube()</code></li>
    <li><code>NamedList&lt;CellSetAxisMetaData&gt; getAxesMetaData()</code></li>
    <li><code>CellSetAxisMetaData getSlicerAxisMetaData()</code></li>
</ul>

<h3>2.4. <a name="MDX_object_model">MDX object model</a></h3>

<p>The MDX object model represents a parsed MDX statement.</p>

<p>An MDX object model can be created in three ways:</p>

<ul>

  <li>The MDX parser parses an MDX string to create an MDX object model;</li>
  <li>Client code programmatically builds a model by calling API methods;</li>
  <li>Code in the transform package manipulates the model in response to
  graphical operations.</li>
</ul>

<p>An MDX object model can exist in an <i>un-validated</i> and <i>validated</i>
state. In the un-validated state, identifiers and function calls exist as raw
strings, and no type information has been assigned. During validation,
identifiers are resolved to specific MDX objects (members, etc.), type
information is assigned, and if a function exists in several overloaded forms, a
specific instance is chosen based upon the types of its arguments.</p>

<p>Any MDX object model can be serialized to a string containing MDX text.</p>

<p>An MDX object model can be converted into a statement. For example,</p>

<div class="code">
  import org.olap.*;<br/>
    import org.olap4j.mdx.*;<br/>
    <br/>
  // Create a query model.<br/>
    OlapConnection connection;<br/>
  SelectNode query = new SelectNode();<br/>
  query.setFrom(<br/>
&nbsp;&nbsp;&nbsp; new IdentifierNode(<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new
  IdentifierNode.NameSegment(&quot;Sales&quot;)));<br/>
  query.getAxisList().add(<br/>
&nbsp;&nbsp;&nbsp; new AxisNode(<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; null,<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; false,<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Axis.ROWS,<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new ArrayList&lt;IdentifierNode&gt;(),<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new CallNode(<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; null,<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;{}&quot;,<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  Syntax.Braces,<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; new
  IdentifierNode(<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  new IdentifierNode(IdentifierNode.ofNames(&quot;Measures&quot;).getSegmentList()),<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  new IdentifierNode(IdentifierNode.ofNames(&quot;Unit Sales&quot;).getSegmentList()))));<br/>
  <br/>
  // Create a statement based upon the object model.<br/>
  OlapStatement stmt;<br/>
  try {<br/>
&nbsp;&nbsp;&nbsp; stmt = connection.createStatement();<br/>
  } catch (OlapException e) {<br/>
&nbsp;&nbsp;&nbsp; System.out.println(&quot;Validation failed: &quot; + e);<br/>
&nbsp;&nbsp;&nbsp; return;<br/>
  }<br/>
  <br/>
  // Execute the statement.<br/>
  CellSet cset;<br/>
  try {<br/>
&nbsp;&nbsp;&nbsp; cset = stmt.executeOlapQuery(query);<br/>
  } catch (OlapException e) {<br/>
&nbsp;&nbsp;&nbsp; System.out.println(&quot;Execution failed: &quot; + e);<br/>
  }</div>

<p>Package name: <a class="javadoc" href="api/org/olap4j/mdx/package-summary.html">org.olap4j.mdx</a></p>

<p>Parse tree classes:</p>

<ul>
  <li><a class="javadoc" href="api/org/olap4j/mdx/ParseTreeNode.html">ParseTreeNode</a> is a node in a parse tree representing a parsed
    MDX statement.</li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/SelectNode.html">SelectNode</a>
    represents a <code>SELECT</code> statement, including <code>FROM</code> and
    <code>WHERE</code>
    clauses if present.</li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/AxisNode.html">AxisNode</a>
    represents an axis expression.</li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/CallNode.html">CallNode</a>
    represents a call to a function or operator.</li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/IdentifierNode.html">IdentifierNode</a>
    represents an identifier, such as <code>Sales</code> or <code>
    [Measures].[Unit Sales]</code>.</li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/LiteralNode.html">LiteralNode</a>
    represents a literal, such as <code>123</code> or <code>&quot;Hello, world!&quot;</code>.</li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/MemberNode.html">MemberNode</a>
    represents a use of a member name in an expression.</li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/LevelNode.html">LevelNode</a>
    represents a use of a level name in an expression.</li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/HierarchyNode.html">HierarchyNode</a>
    represents a use of a hierarchy name in an expression.</li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/DimensionNode.html">DimensionNode</a>
    represents a use of a dimension name in an expression.</li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/WithMemberNode.html">WithMemberNode</a>
    represents a <code>WITH MEMBER</code> clause defining a calculated member.</li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/WithSetNode.html">WithSetNode</a>
    represents a <code>WITH SET</code> clause defining a calculated set.</li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/PropertyValueNode.html">PropertyValueNode</a>
    represents <i>property = value</i> pair as part of a the declaration of a
    calculated member or set.</li>
</ul>

<p>Other classes:</p>

<ul>
  <li>enum <a class="javadoc" href="api/org/olap4j/mdx/Syntax.html">Syntax</a>
    describes the possible syntaxes for functions and operators (infix, prefix,
    function call, and so forth)</li>
</ul>

<h4>2.4.1 <a name="The_ParseTreeWriter_class">The ParseTreeWriter class</a></h4>

<p><a class="javadoc" href="api/org/olap4j/mdx/ParseTreeWriter.html">
ParseTreeWriter</a> is used in conjunction with the
<a class="javadoc" href="api/org/olap4j/mdx/ParseTreeNode.html">
ParseTreeNode.unparse(ParseTreeWriter)</a> method to convert a parse tree into
MDX code.</p>

<h3>2.5. <a name="MDX_parser">MDX parser</a></h3>

<p>Package name: <a class="javadoc" href="api/org/olap4j/type/package-summary.html">org.olap4j.mdx.parser</a></p>

<p>Provides an MDX parser and validator.</p>
<p>Parser and validator are both allocated via a parser factory, which is
obtained from a connection:</p>

<div class="code">
  OlapConnection connection;<br/>
    MdxParserFactory parserFactory =<br/>
&nbsp;&nbsp;&nbsp; connection.getParserFactory();<br/>
    MdxParser parser =<br/>
&nbsp;&nbsp;&nbsp; parserFactory.createMdxParser(connection);<br/>
    SelectNode select =<br/>
&nbsp;&nbsp;&nbsp; parser.parseSelect(&quot;SELECT FROM [Sales]&quot;);<br/>
    MdxValidator validator =<br/>
&nbsp;&nbsp;&nbsp; parserFactory.createMdxValidator(connection);<br/>
    select = validator.validate(select);</div>

<p>Parser and validator are not thread-safe (they cannot be used by more than
one thread simultaneously) but they can be re-used for multiple statements.</p>
<p>One of the chief purposes of validation is to assign a type to every
expression within the parse tree. Before validation, any node's
<a class="javadoc" href="api/org/olap4j/mdx/ParseTreeNode.html#getType()">
ParseTreeNode.getType()</a> method may throw an exception, but after validation
the <code>getType()</code> method will return a type. Nodes which are not
expressions do not have types, and will always return <code>null</code>.</p>
<p>Classes:</p>

<ul>

  <li><a class="javadoc" href="api/org/olap4j/mdx/parser/MdxParserFactory.html">MdxParserFactory</a></li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/parser/MdxParser.html">MdxParser</a></li>
  <li><a class="javadoc" href="api/org/olap4j/mdx/parser/MdxValidator.html">MdxValidator</a></li>
</ul>

<h3 align="left">2.6. <a name="MDX_type_model">MDX type model</a></h3>

<p>Package name: <a class="javadoc" href="api/org/olap4j/type/package-summary.html">org.olap4j.type</a></p>

<p>Represents the MDX type system.</p>

<p>Here are some examples:</p>

<table summary="Type examples">
  <tbody>
    <tr>
        <th>Expression</th>
        <th>Type</th>
    </tr>
    <tr>
        <td><code>1 + 2</code></td>
        <td>Integer</td>
    </tr>
    <tr>
        <td><code>[Store]</code></td>
        <td>Dimension</td>
    </tr>
    <tr>
        <td><code>[Store].[State]</code></td>
        <td>Level&lt;dimension=[Store], hierarchy=[Store]&gt;</td>
    </tr>
    <tr>
        <td><code>[Store].[USA].[CA]</code></td>
        <td>Member&lt;dimension=[Store], hierarchy=[Store], level=[Store].[State],
      member=[Store].[USA].[CA]&gt;</td>
    </tr>
    <tr>
        <td><code>[Store].[USA].Children(2)</code></td>
        <td>Member&lt;dimension=[Store], hierarchy=[Store], level=[Store].[State]&gt;</td>
    </tr>
    </tbody>
</table>

<p>Since MDX is a late-binding language, some expressions will have unknown
types, or only partial type information. For example, the expression</p>

<div class="code">[Store].Levels("Sta" + "te")</div>

<p>will have type <code>Level&lt;dimension=[Store], level=unknown&gt;</code>. The
validator knows that the <code>&lt;hierarchy&gt;.Levels(&lt;string expr&gt;)</code> function
returns a level, but exactly which level is not known until the expression is
evaluated at runtime.</p>
<p><a class="javadoc" href="api/org/olap4j/type/Type.html">Type</a> is the base class for all types.</p>
<p>Scalar types:</p>

<ul>
    <li><a class="javadoc" href="api/org/olap4j/type/ScalarType.html">ScalarType</a> represents the type of an expression which has a
    simple value such as a number or a string.</li>
    <li><a class="javadoc" href="api/org/olap4j/type/BooleanType.html">
    BooleanType</a> (extends <a class="javadoc" href="api/org/olap4j/type/ScalarType.html">ScalarType</a>) represents an expression which can have values
    TRUE and FALSE.</li>
    <li><a class="javadoc" href="api/org/olap4j/type/NumericType.html">
    NumericType</a> represents the type of a numeric expression.</li>
    <li><a class="javadoc" href="api/org/olap4j/type/DecimalType.html">
    DecimalType</a> (extends <code>NumericType</code>) represents a fixed-point numeric expression. It
    is a subclass of <code>NumericType</code>, and has precision and scale. An
    integer expression would have scale 0.</li>
    <li><a class="javadoc" href="api/org/olap4j/type/StringType.html">StringType</a>
    (extends <a class="javadoc" href="api/org/olap4j/type/ScalarType.html">ScalarType</a>)
    represents the type of an expression which has a string value.</li>
    <li><a class="javadoc" href="api/org/olap4j/type/SymbolType.html">SymbolType</a>
    (extends <a class="javadoc" href="api/org/olap4j/type/ScalarType.html">ScalarType</a>)
    represents the type of a symbol, or flag, argument to a built-in function.
    For example, the <code>ASC</code>
    keyword in the expression <code>Order(Gender.MEMBERS, Measures.[Unit Sales],
    ASC)</code> is a symbol. Symbol types are rarely used except if you are
    manipulating a parse tree.</li>
</ul>

<p>Metadata types:</p>

<ul>
    <li><a class="javadoc" href="api/org/olap4j/type/CubeType.html">CubeType</a>
    represents the type of an expression whose value is a cube.</li>
    <li><a class="javadoc" href="api/org/olap4j/type/DimensionType.html">
    DimensionType</a> represents the type of an expression whose
    value is a dimension.</li>
    <li><a class="javadoc" href="api/org/olap4j/type/HierarchyType.html">
    HierarchyType</a> represents the type of an expression whose
    value is a hierarchy.</li>
    <li><a class="javadoc" href="api/org/olap4j/type/LevelType.html">LevelType</a>
    represents the type of an expression whose value is a level.</li>
    <li><a class="javadoc" href="api/org/olap4j/type/MemberType.html">MemberType</a>
    represents the type of an expression whose value is a member.</li>
</ul>
<p>A metadata type may be constrained to a particular part of the schema. For
example, <code>LevelType(hierarchy=[Time])</code> indicates that the expression
must evaluate to one of the levels of the <code>[Time]</code> hierarchy, that
is, one of the values <code>[Time].[Year]</code>, <code>[Time].[Quarter]</code>,
or <code>[Time].[Month]</code>.</p>

<p>Composite types:</p>

<ul>
    <li><a class="javadoc" href="api/org/olap4j/type/SetType.html">SetType</a> represents the type of an expression which is a
    set. It has a component type, for example, the type of the expression <code>
    {[Store].[USA].Children}</code> is <code>Set(Member(level=[Store].[Store
    State])</code>.</li>
    <li><a class="javadoc" href="api/org/olap4j/type/TupleType.html">TupleType</a> represents the type of an expression which
    consists of an n-tuple of members. It has a set of component types, each of
    which is a member type. For example, the type of the expression <code>
    CrossJoin({[Gender].[F], [Gender].[M]}, [Store].Members)</code> is <code>
    Set(Tuple(Member(level=[Gender].[Gender]), Member(hierarchy=[Store]))</code>.</li>
</ul>

<h3>2.7. <a name="Metadata">Metadata</a></h3>

<p>Package name: <a class="javadoc" href="api/org/olap4j/metadata/package-summary.html">org.olap4j.metadata</a></p>

<p>Metadata are the objects which describe the structure of an OLAP schema:
cubes, dimensions, members, properties and so forth.</p>

<p>olap4j exposes metadata in two very different ways:</p>

<ul>
    <li>A <dfn>metadata object</dfn> is a Java object which represents a particular
metadata class. For example, <a class="javadoc" href="api/org/olap4j/metadata/Cube.html">
org.olap4j.metadata.Cube</a>.</li>
    <li>A <dfn>schema result set</dfn> is a JDBC ResultSet which returns a record
    for each instance of a particular metadata class. There is a method in
    the <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html">
    OlapDatabaseMetaData</a> interface to create a schema result set for each metadata class. Some
    of these methods accept parameters to filter the rows returned. For example,
    <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getCubes%28java.lang.String,%20java.lang.String,%20java.lang.String%29">
    OlapDatabaseMetaData.getCubes(String catalog, String schemaNamePattern,
    String cubeNamePattern)</a>.</li>
</ul>

<h4>2.7.1. <a name="Access_control">Access control</a></h4>

<p>A user's view of metadata may be subject to access control. The precise rules
for access control depend on the provider, and this specification does not say
what those rules should be. But this specification requires that the API methods
must behave consistently with the server's access control policy.</p>

<p>For example, in mondrian, users belong to roles, and roles may be granted or
denied access to cubes, hierarchies, or members within hierarchies. Suppose that
user Fred belongs to the &quot;Sales Manager&quot; role, which does not have access to the
<code>[Nation]</code>
    level of the <code>[Store]</code> hierarchy, and the current connection has
been opened in the &quot;Sales Manager&quot; role. Then the <code>Member.getParentMember()</code> method will return null if applied to
<code>[Store].[USA].[CA]</code>, because the 'real' parent member <code>[Store].[USA]</code>
is invisible to him; also, the <code>Hierarchy.getLevels()</code> and <code>
OlapDatabaseMetaData.getLevels()</code> methods will omit the Nation level from
the list of levels they return.</p>

<p>In olap4j, you can set a connection's role at connect time using the
<code>Role</code> connect string property, or you can call the
<code>OlapConnection.setRole(String roleName)</code> method at any point
during the lifecycle of the connection. Setting the role name to
<code>null</code> reverts to the default access-control context.</p>

<h4>2.7.2. <a name="Metadata_objects">Metadata objects</a></h4>

<p>The following diagram shows the metadata objects in an olap4j schema.</p>

<img class="std" alt="olap4j metdata objects" src="olap4j-metadata.png">
<p>In the diagram, each arrow represents a collection of objects in a
parent object; for example, a database is a collection of catalogs,
each catalog is a collection of schemas, each schema is a collection of
cubes, and so forth. Each object has a
corresponding class in the <a class="javadoc" href="api/org/olap4j/metadata/package-summary.html">org.olap4j.metadata</a>
package.</p>

<p>Most metadata objects extend the <a class="javadoc" href="api/org/olap4j/metadata/MetadataElement.html">
MetadataElement</a> interface, which gives them <code>name</code> and <code>
uniqueName</code> attributes, and localized <code>caption</code> and <code>
description</code>.</p>
<p>When the API returns a list of metadata elements whose names must be unique
(for example, the list of dimensions in a cube), the return type is the
<a class="javadoc" href="api/org/olap4j/metadata/NamedList.html">NamedList</a>
extension to
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/util/List.html">
java.util.List</a>.</p>
<p>Providers are at liberty to implement metadata objects using a cache, and
therefore over the course of time, different java objects may represent the same
underlying metadata object. Always use
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html#equals(java.lang.Object)">
equals()</a>, not the <code>==</code> operator, when comparing metadata objects,
and do not use
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/util/IdentityHashMap.html">
IdentityHashMap</a>.</p>

<h5>2.7.2.1. <a name="MetadataElement">The MetadataElement interface</a></h5>

<p>A <a class="javadoc" href="api/org/olap4j/metadata/MetadataElement.html">
MetadataElement</a> is an element which describes the structure of an OLAP
schema.</p>

<p>Subtypes are Cube, Dimension, Hierarchy, Level, Member, Property.
MetadataElement provides
name and unique-name properties (not localized), and localized caption and
description (see <a href="#Internationalization">Internationalization</a>).</p>

<p>Methods:</p>
<ul>
  <li><code>String getName()</code> // name of this metadata element</li>
  <li><code>String getUniqueName()</code> // unique name of this metadata element</li>
  <li><code>String getCaption()</code> // localized caption of this metadata element</li>
  <li><code>String getDescription()</code> // localized description of this metadata element</li>
</ul>

<h5>2.7.2.2. <a name="Database">The Database interface</a></h5>

<p>A <a class="javadoc" href="api/org/olap4j/metadata/Database.html">Database</a>
is the highest level element in the hierarchy of metadata objects. A
database contains one or more catalogs.</p>

<p>Some OLAP servers may only have one database. Mondrian is one such
OLAP server.</p>

<p>To obtain the collection of databases in the current server, call the
<code>OlapConnection.getOlapDatabases()</code> method.</p>

<p>Methods:</p>

<ul>
  <li><code>OlapConnection getOlapConnection()</code> // returns the current connection</li>
  <li><code>String getName()</code> // returns the name of this database</li>
  <li><code>String getDescription()</code> // returns the description of this database</li>
  <li><code>String getURL()</code> // returns the redirection URL, if this database is a proxy to another server</li>
  <li><code>String getDataSourceInfo()</code> // returns provider-specific information</li>
  <li><code>String getProviderName()</code> // returns the name of the underlying OLAP provider</li>
  <li><code>List&lt;ProviderType&gt; getProviderTypes()</code> // returns the types of data that are supported by this provider</li>
  <li><code>List&lt;AuthenticationMode&gt; getAuthenticationModes()</code> // returns the modes of authentication that are supported by this provider</li>
  <li><code>NamedList&lt;Catalog&gt; getCatalogs()</code> // returns a list of catalogs in this database</li>
</ul>

<h5>2.7.2.3. <a name="Catalog">The Catalog interface</a></h5>

<p>A <a class="javadoc" href="api/org/olap4j/metadata/Catalog.html">Catalog</a>
is the second highest level element in the hierarchy of metadata objects. A
catalog belongs to a database and contains one or more schemas.</p>

<p>Some OLAP servers may only have one catalog. Mondrian is one such OLAP
server; its sole catalog is always called "LOCALDB".</p>

<p>To obtain the collection of catalogs in the current server, call the
<code>OlapConnection.getOlapCatalogs()</code> method.</p>

<p>Methods:</p>
<ul>
  <li><code>String getName()</code> // returns the name of this catalog</li>
  <li><code>NamedList&lt;Schema&gt; getSchemas()</code> // returns a list of schemas in this catalog</li>
  <li><code>OlapDatabaseMetaData getMetaData()</code> // returns the metadata describing the OLAP server that this catalog belongs to</li>
  <li><code>Database getDatabase()</code> // returns this catalog's parent database</li>
</ul>

<h5>2.7.2.4. <a name="Schema">The Schema interface</a></h5>

<p>A <a class="javadoc" href="api/org/olap4j/metadata/Schema.html">Schema</a> is
a collection of database objects that contain structural information, or
metadata, about a database.</p>

<p>It belongs to a catalog and contains a number of cubes and shared dimensions.</p>

<p>Methods:</p>
<ul>
    <li><code>Catalog getCatalog()</code> // returns this schema's parent catalog</li>
    <li><code>String getName()</code> // returns the name of this catalog</li>
    <li><code>NamedList&lt;Dimension&gt; getSharedDimensions()</code></li>
    <li><code>NamedList&lt;Cube&gt; getCubes()</code></li>
    <li><code>Collection&lt;Locale&gt; getSupportedLocales()</code> (see <a href="#Internationalization">
    Internationalization</a>)</li>
</ul>

<p>To obtain the collection of schemas in the current server, call the
<code>OlapConnection.getOlapSchemas()</code> method.</p>

<h5>2.7.2.5. <a name="Cube">The Cube interface</a></h5>

<p>A <a class="javadoc" href="api/org/olap4j/metadata/Cube.html">Cube</a> is the
central metadata object for representing multidimensional data.</p>

<p>It belongs to a schema, and is described by a list of dimensions and a list
of measures. It may also have a collection of named sets, each defined by a
formula.</p>

<p>Methods:</p>
<ul>
    <li><code>NamedList&lt;Dimension&gt; getDimensions()</code></li>
    <li><code>NamedList&lt;Hierarchy&gt; getHierarchies()</code></li>
    <li><code>List&lt;Measure&gt; getMeasures()</code></li>
    <li><code>NamedList&lt;NamedSet&gt; getSets()</code></li>
    <li><code>Schema getSchema()</code></li>
    <li><code>String getName()</code></li>
    <li><code>List&lt;Locale&gt; getSupportedLocales()</code> (see <a href="#Internationalization">
    Internationalization</a>)</li>
    <li><code>Member lookupMember(List&lt;IdentifierSegment&gt; nameParts)</code></li>
    <li><code>List&lt;Member&gt; lookupMembers(Set&lt;TreeOp&gt; treeOps, List&lt;IdentifierSegment&gt; nameParts)</code></li>
</ul>

<h5>2.7.2.6. <a name="Dimension">The Dimension interface</a></h5>

<p>A <a class="javadoc" href="api/org/olap4j/metadata/Dimension.html">Dimension</a>
(extends <a class="javadoc" href="api/org/olap4j/metadata/MetadataElement.html">
MetadataElement</a>) is an organized hierarchy of categories, known as levels,
that describes data in a cube.</p>
<p>Dimensions typically describe a similar set of members upon which the user
wants to base an analysis.</p>
<p>A dimension must have at least one hierarchy, and may have more than once,
but most have exactly one hierarchy.</p>

<ul>
    <li><code>String getName()</code></li>
    <li><code>NamedList&lt;Hierarchy&gt; getHierarchies()</code></li>
    <li><code>Dimension.Type getDimensionType()</code></li>
</ul>

<h5>2.7.2.7. <a name="Hierarchy">The Hierarchy interface</a></h5>

<p>A <a class="javadoc" href="api/org/olap4j/metadata/Hierarchy.html">Hierarchy</a>&nbsp;
(extends <a class="javadoc" href="api/org/olap4j/metadata/MetadataElement.html">
MetadataElement</a>) is an organization of the set of members in a dimension and
their positions relative to one another.</p>

<p>A hierarchy is a collection of levels, each of which is a category of similar
members.</p>

<p>Methods:</p>
<ul>
    <li><code>Dimension getDimension()</code></li>
    <li><code>String getName()</code></li>
    <li><code>NamedList&lt;Level&gt; getLevels()</code></li>
    <li><code>boolean hasAll()</code></li>
    <li><code>Member getDefaultMember()</code></li>
    <li><code>NamedList&lt;Member&gt; getRootMembers()</code></li>
</ul>

<h5>2.7.2.8. <a name="Level">The Level interface</a></h5>

<p>A <a class="javadoc" href="api/org/olap4j/metadata/Level.html">Level</a>&nbsp;
(extends <a class="javadoc" href="api/org/olap4j/metadata/MetadataElement.html">
MetadataElement</a>) is a group of members in a hierarchy, all with the same
attributes and at the same depth in the hierarchy.</p>

<p>Methods:</p>
<ul>
    <li><code>int getDepth()</code></li>
    <li><code>Hierarchy getHierarchy()</code></li>
    <li><code>Level.Type getLevelType()</code></li>
    <li><code>NamedList&lt;Property&gt; getProperties()</code></li>
    <li><code>List&lt;Member&gt; getMembers()</code></li>
    <li><code>int getCardinality()</code></li>
</ul>

<h5>2.7.2.9. <a name="Member">The Member interface</a></h5>

<p>A <a class="javadoc" href="api/org/olap4j/metadata/Member.html">Member</a>&nbsp;
(extends <a class="javadoc" href="api/org/olap4j/metadata/MetadataElement.html">
MetadataElement</a>) is a data value in an OLAP dimension.</p>

<p>Methods:</p>
<ul>
    <li><code>String getName()</code></li>
    <li><code>NamedList&lt;Member&gt; getChildMembers()</code></li>
    <li><code>Member getParentMember()</code></li>
    <li><code>Level getLevel()</code></li>
    <li><code>Hierarchy getHierarchy()</code></li>
    <li><code>boolean isAll()</code></li>
    <li><code>boolean isChildOrEqualTo(Member member)</code></li>
    <li><code>boolean isCalculated()</code></li>
    <li><code>boolean isCalculatedInQuery()</code></li>
    <li><code>int solveOrder()</code></li>
    <li><code>List&lt;Member&gt; getAncestorMembers()</code></li>
    <li><code>Object getPropertyValue(Property property)</code></li>
    <li><code>String getPropertyFormattedValue(Property property)</code></li>
    <li><code>void setProperty(Property property, Object value)</code></li>
    <li><code>NamedList&lt;Property&gt; getProperties()</code></li>
    <li><code>int getOrdinal()</code></li>
    <li><code>boolean isHidden()</code></li>
    <li><code>Member getDataMember()</code></li>
    <li><code>int getChildMemberCount()</code></li>
</ul>

<h5>2.7.2.10. <a name="Measure">The Measure interface</a></h5>

<p>A <a class="javadoc" href="api/org/olap4j/metadata/Measure.html">Measure</a>&nbsp;(extends
<a class="javadoc" href="api/org/olap4j/metadata/Member.html">Member</a>) is a
data value of primary interest to the user browsing the cube. It provides the
value of each cell, and is usually numeric.</p>

<p>Every measure is a member of a special dimension called "Measures".</p>

<p>Methods:</p>
<ul>
    <li><code>boolean isVisible()</code></li>
    <li><code>Aggregator getAggregator()</code></li>
    <li><code>Datatype getDataType()</code></li>
</ul>

<h5>2.7.2.11. <a name="Property">The Property interface</a></h5>

<p><a class="javadoc" href="api/org/olap4j/metadata/Property.html">Property</a>&nbsp;
(extends <a class="javadoc" href="api/org/olap4j/metadata/MetadataElement.html">
MetadataElement</a>) is the definition of a property of a member or a cell.</p>
<p><code>Property</code> contains two enumerated types
<a class="javadoc" href="api/org/olap4j/metadata/Property.StandardMemberProperty.html">
StandardMemberProperty</a> and
<a class="javadoc" href="api/org/olap4j/metadata/Property.StandardCellProperty.html">
StandardCellProperty</a> whose values are the built-in properties of members and
cells. Because these types implement the Property interface, you can use them as
properties; for example:</p>

<div class="code">
    Member member;<br/>
    Object o =
    member.getPropertyValue(<br/>
&nbsp;&nbsp;&nbsp; Property.StandardMemberProperty.CATALOG_NAME);</div>

<p>Members:</p>

<ul>
    <li><code>Datatype getDatatype()</code></li>
    <li><code>Set&lt;TypeFlag&gt; getType()</code></li>
    <li><code>ContentType getContentType()</code></li>
    <li><code>enum TypeFlag { MEMBER, CELL, SYSTEM, BLOB }</code></li>
    <li><code>enum StandardMemberProperty implements Property { CATALOG_NAME, SCHEMA_NAME, CUBE_NAME, ...
    }</code></li>
    <li><code>enum StandardCellProperty implements Property { BACK_COLOR, CELL_EVALUATION_LIST, ... }</code></li>
    <li><code>enum ContentType { REGULAR, ID, RELATION_TO_PARENT, ... }</code></li>
</ul>

<h5>2.7.2.12. <a name="NamedSet">The NamedSet interface</a></h5>

<p>A <a class="javadoc" href="api/org/olap4j/metadata/NamedSet.html">NamedSet</a>
(extends <a class="javadoc" href="api/org/olap4j/metadata/MetadataElement.html">
MetadataElement</a>) describes a set whose value is determined by an MDX
expression. It belongs to a cube.</p>

<p>Methods:</p>
<ul>
    <li><code>Cube getCube()</code></li>
    <li><code>Expression getExpression()</code></li>
</ul>

<h5>2.7.2.13. <a name="Datatype">The Datatype enum</a></h5>

<p>The <a class="javadoc" href="api/org/olap4j/metadata/Datatype.html">
Datatype</a> enum describes the type of property and measure values. Because
olap4j drivers need to interoperate with OLE DB for OLAP and XMLA systems,
Datatype values have the same ordinals as in the OLE DB specification, and we
show here the
name and description of the corresponding type in the OLE DB specification. The table shows
the analogous Java type, if there is one.</p>

<table summary="Datatype columns">
    <tbody>
    <tr>
        <th>Datatype</th>
        <th>Java&nbsp;type</th>
        <th>OLE DB type</th>
        <th>Description</th>
    </tr>
    <tr>
        <td>INTEGER</td>
        <td>int</td>
        <td>DBTYPE_I4</td>
        <td>A four-byte, signed integer: INTEGER</td>
    </tr>
    <tr>
        <td>DOUBLE</td>
        <td>double</td>
        <td>DBTYPE_R8</td>
        <td>A double-precision floating-point value: Double</td>
    </tr>
    <tr>
        <td>CURRENCY</td>
        <td>&nbsp;</td>
        <td>DBTYPE_CY</td>
        <td>A currency value: LARGE_INTEGER, Currency is a fixed-point number with four digits to the right of the decimal point. It is stored in an eight-byte signed integer, scaled by 10,000.</td>
    </tr>
    <tr>
        <td>BOOLEAN</td>
        <td>boolean</td>
        <td>DBTYPE_BOOL</td>
        <td>A Boolean value stored in the same way as in Automation: VARIANT_BOOL; 0 means false and ~0 (bitwise, the value is not 0; that is, all bits are set to 1) means true.</td>
    </tr>
    <tr>
        <td>VARIANT</td>
        <td>Object</td>
        <td>DBTYPE_VARIANT</td>
        <td>An Automation VARIANT</td>
    </tr>
    <tr>
        <td>UNSIGNED_SHORT</td>
        <td>-</td>
        <td>DBTYPE_UI2</td>
        <td>A two-byte, unsigned integer</td>
    </tr>
    <tr>
        <td>UNSIGNED_INTEGER</td>
        <td>-</td>
        <td>DBTYPE_UI4</td>
        <td>A four-byte, unsigned integer</td>
    </tr>
    <tr>
        <td>LARGE_INTEGER</td>
        <td>long</td>
        <td>DBTYPE_I8</td>
        <td>An eight-byte, signed integer: LARGE_INTEGER</td>
    </tr>
    <tr>
        <td>STRING</td>
        <td>String</td>
        <td>DBTYPE_WSTR</td>
        <td>A null-terminated Unicode character string: wchar_t[length]; If DBTYPE_WSTR is used by itself, the number of bytes allocated for the string, including the null-termination character, is specified by cbMaxLen in the DBBINDING structure. If DBTYPE_WSTR is combined with DBTYPE_BYREF, the number of bytes allocated for the string, including the null-termination character, is at least the length of the string plus two. In either case, the actual length of the string is determined from the bound length value. The maximum length of the string is the number of allocated bytes divided by sizeof(wchar_t) and truncated to the nearest integer.</td>
    </tr>
</tbody>
</table>

<h4>2.7.3. <a name="The_OlapDatabaseMetaData_interface_and_methods_which_return_schema_rowsets">The
OlapDatabaseMetaData interface, and methods which return schema rowsets</a></h4>

<p><a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html">
OlapDatabaseMetaData</a> (extends
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html">java.sql.DatabaseMetaData</a>)
contains methods which return schema result sets.</p>

<p>Schema result sets are specified as in [<a href="#XMLA">XML for Analysis
specification</a>]. Here is a table of the XML/A methods and the
corresponding olap4j method and element type.</p>

<table summary="Schema result sets">

  <tbody>
    <tr>
      <th>XML for Analysis schema rowset</th>
      <th>Schema result set method</th>
      <th>Metadata element</th>
    </tr>
    <tr>
      <td>DBSCHEMA_CATALOGS</td>
      <td> <a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#getCatalogs%28%29">DatabaseMetaData.getCatalogs</a></td>
      <td> <a class="javadoc" href="api/org/olap4j/metadata/Catalog.html">Catalog</a></td>
    </tr>
    <tr>
      <td>not supported</td>
      <td> <a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/DatabaseMetaData.html#getSchemas%28%29">DatabaseMetaData.getSchemas</a></td>
      <td> <a class="javadoc" href="api/org/olap4j/metadata/Schema.html">Schema</a></td>
    </tr>
    <tr>
      <td>DBSCHEMA_COLUMNS</td>
      <td>not supported</td>
      <td>not supported</td>
    </tr>
    <tr>
      <td>DBSCHEMA_PROVIDER_TYPES</td>
      <td>not supported</td>
      <td>not supported</td>
    </tr>
    <tr>
      <td>DBSCHEMA_TABLES</td>
      <td>not supported</td>
      <td>not supported</td>
    </tr>
    <tr>
      <td>DBSCHEMA_TABLES_INFO</td>
      <td>not supported</td>
      <td>not supported</td>
    </tr>
    <tr>
      <td>DISCOVER_DATASOURCES</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getDatabases%28java.lang.String%29">OlapDatabaseMetaData.getDatabases</a></td>
      <td><a class="javadoc" href="api/org/olap4j/metadata/Database.html">Database</a></td>
    </tr>
    <tr>
      <td>DISCOVER_ENUMERATORS</td>
      <td>not supported</td>
      <td>not supported</td>
    </tr>
    <tr>
      <td>DISCOVER_KEYWORDS</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getMdxKeywords%28%29">OlapDatabaseMetaData.getMdxKeywords</a></td>
      <td> not supported</td>
    </tr>
    <tr>
      <td>DISCOVER_LITERALS</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getLiterals%28%29">OlapDatabaseMetaData.getLiterals</a></td>
      <td> not supported</td>
    </tr>
    <tr>
      <td>DISCOVER_PROPERTIES</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getDatabaseProperties%28java.lang.String%29">OlapDatabaseMetaData.getDatabaseProperties</a></td>
      <td> not supported</td>
    </tr>
    <tr>
      <td>DISCOVER_SCHEMA_ROWSETS</td>
      <td>not supported</td>
      <td>not supported</td>
    </tr>
    <tr>
      <td>MDSCHEMA_ACTIONS</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getActions%28%29">OlapDatabaseMetaData.getActions</a></td>
      <td> not supported</td>
    </tr>
    <tr>
      <td>MDSCHEMA_CUBES</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getCubes%28java.lang.String,%20java.lang.String,%20java.lang.String%29">OlapDatabaseMetaData.getCubes</a></td>
      <td> <a class="javadoc" href="api/org/olap4j/metadata/Cube.html">Cube</a></td>
    </tr>
    <tr>
      <td>MDSCHEMA_DIMENSIONS</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getDimensions%28%29">OlapDatabaseMetaData.getDimensions</a></td>
      <td> <a class="javadoc" href="api/org/olap4j/metadata/Dimension.html">Dimension</a></td>
    </tr>
    <tr>
      <td>MDSCHEMA_FUNCTIONS</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getFunctions%28%29">OlapDatabaseMetaData.getFunctions</a></td>
      <td> not supported</td>
    </tr>
    <tr>
      <td>MDSCHEMA_HIERARCHIES</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getHierarchies%28%29">OlapDatabaseMetaData.getHierarchies</a></td>
      <td> <a class="javadoc" href="api/org/olap4j/metadata/Hierarchy.html">Hierarchy</a></td>
    </tr>
    <tr>
      <td>MDSCHEMA_INPUT_DATASOURCES</td>
      <td>not supported</td>
      <td>not supported</td>
    </tr>
    <tr>
      <td>MDSCHEMA_KPIS</td>
      <td>not supported</td>
      <td>not supported</td>
    </tr>
    <tr>
      <td>MDSCHEMA_LEVELS</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getLevels%28%29">OlapDatabaseMetaData.getLevels</a></td>
      <td> <a class="javadoc" href="api/org/olap4j/metadata/Level.html">Level</a></td>
    </tr>
    <tr>
      <td>MDSCHEMA_MEASURES</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getMeasures%28%29">OlapDatabaseMetaData.getMeasures</a></td>
      <td> <a class="javadoc" href="api/org/olap4j/metadata/Measure.html">Measure</a></td>
    </tr>
    <tr>
      <td>MDSCHEMA_MEMBERS</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getMembers%28%29">OlapDatabaseMetaData.getMembers</a></td>
      <td> <a class="javadoc" href="api/org/olap4j/metadata/Member.html">Member</a></td>
    </tr>
    <tr>
      <td>MDSCHEMA_PROPERTIES</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getProperties%28%29">OlapDatabaseMetaData.getProperties</a></td>
      <td> <a class="javadoc" href="api/org/olap4j/metadata/Property.html">Property</a></td>
    </tr>
    <tr>
      <td>MDSCHEMA_SETS</td>
      <td> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getSets%28%29">OlapDatabaseMetaData.getSets</a></td>
      <td> <a class="javadoc" href="api/org/olap4j/metadata/NamedSet.html">NamedSet</a></td>
    </tr>
  </tbody>
</table>

<p>The rows returned in the result set returned from the metadata
methods are structured according to the result set column layouts
detailed in this
section.</p>

<p>All columns noted in the following result sets are required, and
they must be returned in the order shown. However, additional columns
(which
should be ignored by clients not expecting them) can be added at the
end, and
some columns can contain null data for info that does not apply.</p>

<p>The following sections describe the columns in each rowset. Each
section includes a table that provides the following information for
each
column.</p>

<table summary="Columns">

  <tbody>
    <tr>
      <th nowrap="nowrap">Column heading</th>
      <th>Contents</th>
    </tr>
    <tr>
      <td>Column name</td>
      <td>The name of the column in the output rowset.</td>
    </tr>
    <tr>
      <td>Type</td>
      <td>A description of the data type for the column, and whether
the column may be NULL.</td>
    </tr>
    <tr>
      <td>Description</td>
      <td>A brief description of the purpose of the column.</td>
    </tr>
  </tbody>
</table>

<h5>2.7.3.1. <a name="getDatabases">getDatabases</a></h5>

<p>Specified by the <code>DISCOVER_DATASOURCES</code> XML for Analysis
method.</p>

<p>Note that we use the name 'database' rather than 'data source'
because 'data source' has a well-established and entirely different
meaning (see <a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/javax/sql/DataSource.html">interface
javax.sql.DataSource</a>) in the JDBC specification.</p>

<p>The returned result set contains the following columns.</p>

<table summary="Columns returned from getDatabases">
  <tbody>
    <tr>
      <th width="250">Column name</th>
      <th width="100">Type</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>DATA_SOURCE_NAME</td>
      <td width="74">String</td>
      <td>The name of the data source, such as <b> FoodMart 2000</b>.
Never null.</td>
    </tr>
    <tr>
      <td>DATA_SOURCE_DESCRIPTION</td>
      <td width="74">String</td>
      <td>A description of the data source, as entered by the publisher.</td>
    </tr>
    <tr>
      <td>URL</td>
      <td width="74">String</td>
      <td>The unique path that shows where to invoke the XML for
Analysis methods for that data source.</td>
    </tr>
    <tr>
      <td>DATA_SOURCE_INFO</td>
      <td width="74">String</td>
      <td>
      <p>A string containing any additional information required to
connect to the data source. This can include the Initial Catalog
property or other information for the provider.</p>
      <p>Example: <code>"Provider=MSOLAP;Data Source=Local;"</code></p>
      </td>
    </tr>
    <tr>
      <td>PROVIDER_NAME</td>
      <td width="74">String</td>
      <td>
      <p>The name of the provider behind the data source. </p>
      <p>Example: <code>"MSDASQL"</code></p>
      </td>
    </tr>
    <tr>
      <td>PROVIDER_TYPE</td>
      <td width="74">String</td>
      <td>
      <p>Comma-separated list of the types of data supported by the
provider. May include one or more of the following types. Example
follows this table.</p>
      <ul>
        <li><b>TDP</b>: tabular data provider.</li>
        <li><b>MDP</b>: multidimensional data provider.</li>
        <li><b>DMP</b>: data mining provider. A DMP provider implements
the OLE DB for Data Mining specification.</li>
      </ul>
      </td>
    </tr>
    <tr>
      <td>AUTHENTICATION_MODE</td>
      <td width="74">String</td>
      <td> Specification of what type of security mode the data source
uses. Values can be one of the following, never null:
      <ul>
        <li><b>Unauthenticated</b>: no user ID or password needs to be
sent.</li>
        <li><b>Authenticated</b>: User ID and Password must be included
in the information required for the connection.</li>
        <li><b>Integrated</b>: the data source uses the underlying
security to determine authorization, such as Integrated Security
provided by Microsoft Internet Information Services (IIS).</li>
      </ul>
      </td>
    </tr>
  </tbody>
</table>

<h5>2.7.3.2. <a name="getDatabaseProperties">getDatabaseProperties</a></h5>

<p>Returns
information about the standard and provider-specific properties
supported by an
olap4j provider. Properties that are not supported by a provider are
not listed in the return result set.</p>

<p>Specified by the <code>DISCOVER_PROPERTIES</code> XML for Analysis
method, except that we rename the VALUE property to PROPERTY_VALUE
because "VALUE" is a SQL:2003 reserved word.</p>

<p>The returned result set contains the following columns.</p>

<table summary="Columns returned from getDatabaseProperties">

  <tbody>
    <tr>
      <th width="250">Column name</th>
      <th width="100">Type</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>PROPERTY_NAME</td>
      <td>String</td>
      <td>The name of the property. Never null.</td>
    </tr>
    <tr>
      <td>PROPERTY_DESCRIPTION</td>
      <td>String</td>
      <td>A localizable text description of the property.</td>
    </tr>
    <tr>
      <td>PROPERTY_TYPE</td>
      <td>String</td>
      <td>The XML data type of the property.</td>
    </tr>
    <tr>
      <td>PROPERTY_ACCESS_TYPE</td>
      <td>String</td>
      <td>Access for the property. The value can be Read, Write, or
ReadWrite. Never null.</td>
    </tr>
    <tr>
      <td>IS_REQUIRED</td>
      <td>boolean</td>
      <td>True if a property is required, false if it is not required.</td>
    </tr>
    <tr>
      <td>PROPERTY_VALUE</td>
      <td>String</td>
      <td>The current value of the property.
      <p>This property is named VALUE in XMLA.</p>
      </td>
    </tr>
  </tbody>
</table>

<h5>2.7.3.3 <a name="getLiterals">getLiterals</a></h5>

<p>Retrieves a list of information on supported literals, including
data types
and values.</p>

<p>Specified by the <code>DISCOVER_LITERALS</code> XML for Analysis
method.</p>

<p>The returned result set contains the following columns.</p>

<table summary="Columns returned from getLiterals">

  <tbody>
    <tr>
      <th width="250">Column name</th>
      <th width="100">Type</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>LITERAL_NAME</td>
      <td>String</td>
      <td>
      <p>The name of the literal described in the row. Never null.</p>
      <p>Example: DBLITERAL_LIKE_PERCENT.</p>
      </td>
    </tr>
    <tr>
      <td>LITERAL_VALUE</td>
      <td>String</td>
      <td>
      <p>Contains the actual literal value.</p>
      <p>Example, if <code>LITERAL_NAME</code> is
DBLITERAL_LIKE_PERCENT and the percent character (%) is used to match
zero or more characters in a LIKE clause, this column's value would be
"%".</p>
      </td>
    </tr>
    <tr>
      <td>LITERAL_INVALID_CHARS</td>
      <td>String</td>
      <td>
      <p>The characters, in the literal, that are not valid. </p>
      <p>For example, if table names can contain anything other than a
numeric character, this string would be "0123456789".</p>
      </td>
    </tr>
    <tr>
      <td>LITERAL_INVALID_<br/>
STARTING_CHARS</td>
      <td>String</td>
      <td>The characters that are not valid as the first character of
the literal. If the literal can start with any valid character, this is
null.</td>
    </tr>
    <tr>
      <td>LITERAL_MAX_LENGTH</td>
      <td>int</td>
      <td>The maximum number of characters in the literal. If there is
no maximum or the maximum is unknown, the value is -1.</td>
    </tr>
  </tbody>
</table>

<h5>2.7.3.4. <a name="getCubes">getCubes</a></h5>

<p>Describes the structure of cubes within a database.</p>

<p>Specified by the <code>MDSCHEMA_CUBES</code> XML for Analysis
method.</p>

<p>The returned result set contains the following columns.</p>

<table summary="Columns returned from getCubes">
  <tbody>
    <tr>
      <th width="250">Column name</th>
      <th width="100">Type</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>CATALOG_NAME</td>
      <td>String</td>
      <td>The name of the database.</td>
    </tr>
    <tr>
      <td>SCHEMA_NAME</td>
      <td>String</td>
      <td>Not supported.</td>
    </tr>
    <tr>
      <td>CUBE_NAME</td>
      <td>String</td>
      <td>The name of the cube or dimension. Dimension names are
prefaced by a dollar sign ($) symbol.</td>
    </tr>
    <tr>
      <td>CUBE_TYPE</td>
      <td>String</td>
      <td>The type of the cube. Valid values are:
      <ul>
        <li><b>CUBE</b></li>
        <li><b>DIMENSION</b></li>
      </ul>
      </td>
    </tr>
    <tr>
      <td>CUBE_GUID</td>
      <td>String</td>
      <td>Not supported.</td>
    </tr>
    <tr>
      <td>CREATED_ON</td>
      <td>Timestamp</td>
      <td>Not supported.</td>
    </tr>
    <tr>
      <td>LAST_SCHEMA_UPDATE</td>
      <td>Timestamp</td>
      <td>The time that the cube was last processed.</td>
    </tr>
    <tr>
      <td>SCHEMA_UPDATED_BY</td>
      <td>String</td>
      <td>Not supported.</td>
    </tr>
    <tr>
      <td>LAST_DATA_UPDATE</td>
      <td>Timestamp</td>
      <td>The time that the cube was last processed.</td>
    </tr>
    <tr>
      <td>DATA_UPDATED_BY</td>
      <td>String</td>
      <td>Not supported.</td>
    </tr>
    <tr>
      <td>DESCRIPTION</td>
      <td>String</td>
      <td>A user-friendly description of the cube.</td>
    </tr>
    <tr>
      <td>IS_DRILLTHROUGH_ENABLED</td>
      <td>boolean</td>
      <td>A Boolean that always returns true.</td>
    </tr>
    <tr>
      <td>IS_LINKABLE</td>
      <td>boolean</td>
      <td>A Boolean that indicates whether a cube can be used in a
linked cube.</td>
    </tr>
    <tr>
      <td>IS_WRITE_ENABLED</td>
      <td>boolean</td>
      <td>A Boolean that indicates whether a cube is write-enabled.</td>
    </tr>
    <tr>
      <td>IS_SQL_ENABLED</td>
      <td>boolean</td>
      <td>A Boolean that indicates whether SQL can be used on the cube.</td>
    </tr>
    <tr>
      <td>CUBE_CAPTION</td>
      <td>String</td>
      <td>The caption of the cube.</td>
    </tr>
    <tr>
      <td>BASE_CUBE_NAME</td>
      <td>String</td>
      <td>The name of the source cube if this cube is a perspective
cube.</td>
    </tr>
    <tr>
      <td>ANNOTATIONS</td>
      <td>String</td>
      <td>(Optional) A set of notes, in XML format.</td>
    </tr>
  </tbody>
</table>

<p>The rowset is sorted on <b>CATALOG_NAME</b>, <b>SCHEMA_NAME</b>, <b>CUBE_NAME</b>.</p>

<h5>2.7.3.5. <a name="getDimensions">getDimensions</a></h5>

<p>Retrieves a result set describing the shared and private dimensions
within a database.</p>

<p>Specified by the <code>MDSCHEMA_DIMENSIONS</code> XML for Analysis
method.</p>

<p>The returned result set contains the following columns.</p>

<table summary="Columns returned from getDimensions">

  <tbody>
    <tr>
      <th width="250">Column name</th>
      <th width="100">Type</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>CATALOG_NAME</td>
      <td>String</td>
      <td>The name of the database.</td>
    </tr>
    <tr>
      <td>SCHEMA_NAME</td>
      <td>String</td>
      <td>Not supported.</td>
    </tr>
    <tr>
      <td>CUBE_NAME</td>
      <td>String</td>
      <td>The name of the cube.</td>
    </tr>
    <tr>
      <td>DIMENSION_NAME</td>
      <td>String</td>
      <td>The name of the dimension. If a dimension is part of more
than one cube or measure group, then there is one row for each unique
combination of dimension, measure group, and cube.</td>
    </tr>
    <tr>
      <td>DIMENSION_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the dimension.</td>
    </tr>
    <tr>
      <td>DIMENSION_GUID</td>
      <td>String</td>
      <td>Not supported.</td>
    </tr>
    <tr>
      <td>DIMENSION_CAPTION</td>
      <td>String</td>
      <td>The caption of the dimension. This should be used when
displaying the name of the dimension to the user, such as in the user
interface or reports.</td>
    </tr>
    <tr>
      <td>DIMENSION_ORDINAL</td>
      <td>int</td>
      <td>The position of the dimension within the cube.</td>
    </tr>
    <tr>
      <td>DIMENSION_TYPE</td>
      <td>int</td>
      <td>The type of the dimension. Valid values include the values of
the <code> xmlaOrdinal</code> attribute of the <a class="javadoc" href="api/org/olap4j/metadata/Dimension.Type.html">org.olap4j.Dimension.Type</a>
enum.</td>
    </tr>
    <tr>
      <td>DIMENSION_CARDINALITY</td>
      <td>int</td>
      <td>The number of members in the key attribute.</td>
    </tr>
    <tr>
      <td>DEFAULT_HIERARCHY</td>
      <td>String</td>
      <td>A hierarchy from the dimension. Preserved for backwards
compatibility.</td>
    </tr>
    <tr>
      <td>DESCRIPTION</td>
      <td>String</td>
      <td>A user-friendly description of the dimension.</td>
    </tr>
    <tr>
      <td>IS_VIRTUAL</td>
      <td>boolean</td>
      <td>Always <code>false</code>.</td>
    </tr>
    <tr>
      <td>IS_READWRITE</td>
      <td>boolean</td>
      <td>A Boolean that indicates whether the dimension is
write-enabled.
      <p><code>true</code> if the dimension is write-enabled.</p>
      </td>
    </tr>
    <tr>
      <td>DIMENSION_UNIQUE_SETTINGS</td>
      <td>int</td>
      <td>A bitmap that specifies which columns contain unique values
if the dimension contains only members with unique names. The following
bit value constants are defined for this bitmap:
      <ul>
        <li><b>MDDIMENSIONS_MEMBER_KEY_UNIQUE (1)</b></li>
      </ul>
      </td>
    </tr>
    <tr>
      <td>DIMENSION_MASTER_<br/>
UNIQUE_NAME</td>
      <td>String</td>
      <td>Always <code>null</code>.</td>
    </tr>
    <tr>
      <td>DIMENSION_IS_VISIBLE</td>
      <td>boolean</td>
      <td>Always <code>true</code>.</td>
    </tr>
  </tbody>
</table>

<p>The result set is sorted on <b>CATALOG_NAME</b>, <b> SCHEMA_NAME</b>,
<b>CUBE_NAME</b>, <b>DIMENSION_NAME</b>.</p>

<h5>2.7.3.6. <a name="getFunctions">getFunctions</a></h5>

<p>Retrieves a result set describing the functions available to client
applications connected to the database.</p>

<p>Specified by the <code>MDSCHEMA_FUNCTIONS</code> XML for Analysis
method.</p>

<p>The returned result set contains the following columns.</p>

<table summary="Columns returned from getFunctions">

  <tbody>
    <tr>
      <th width="250">Column name</th>
      <th width="100">Type</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>FUNCTION_NAME</td>
      <td>String</td>
      <td>The name of the function.</td>
    </tr>
    <tr>
      <td>DESCRIPTION</td>
      <td>String</td>
      <td>A description of the function.</td>
    </tr>
    <tr>
      <td>PARAMETER_LIST</td>
      <td>String</td>
      <td>A comma delimited list of parameters formatted as in
Microsoft Visual Basic. For example, a parameter might be Name as
String.</td>
    </tr>
    <tr>
      <td>RETURN_TYPE</td>
      <td>int</td>
      <td>The <b>VARTYPE</b> of the return data type of the function.</td>
    </tr>
    <tr>
      <td>ORIGIN</td>
      <td>int</td>
      <td>The origin of the function:
      <ul>
        <li>1 for MDX functions.</li>
        <li>2 for user-defined functions.</li>
      </ul>
      </td>
    </tr>
    <tr>
      <td>INTERFACE_NAME</td>
      <td>String</td>
      <td>The name of the interface for user-defined functions
      <p>The group name for Multidimensional Expressions (MDX)
functions.</p>
      </td>
    </tr>
    <tr>
      <td>LIBRARY_NAME</td>
      <td>String</td>
      <td>The name of the type library for user-defined functions. <code>null</code>
for MDX functions. </td>
    </tr>
    <tr>
      <td>DLL_NAME</td>
      <td>String</td>
      <td>(Optional) The name of the assembly that implements the
user-defined function.
      <p>Returns <code>null</code> for MDX functions.</p>
      </td>
    </tr>
    <tr>
      <td>HELP_FILE</td>
      <td>String</td>
      <td>(Optional) The name of the file that contains the help
documentation for the user-defined function.
      <p>Returns <code>null</code> for MDX functions.</p>
      </td>
    </tr>
    <tr>
      <td>HELP_CONTEXT</td>
      <td>int</td>
      <td>(Optional) Returns the Help context ID for this function.</td>
    </tr>
    <tr>
      <td>OBJECT</td>
      <td>String</td>
      <td>(Optional) The generic name of the object class to which a
property applies. For example, the rowset corresponding to the
&lt;level_name&gt;.Members function returns "<b>Level</b>".
      <p>Returns <code>null</code> for user-defined functions, or
non-property MDX functions.</p>
      </td>
    </tr>
    <tr>
      <td>CAPTION</td>
      <td>String</td>
      <td>The display caption for the function.</td>
    </tr>
  </tbody>
</table>

<p>The rowset is sorted on <b>ORIGIN</b>, <b>INTERFACE_NAME</b>, <b>FUNCTION_NAME</b>.</p>

<h5>2.7.3.7. <a name="getHierarchies">getHierarchies</a></h5>

<p>Retrieves a result set describing each hierarchy within a particular
dimension.</p>

<p>Specified by the <code>MDSCHEMA_HIERARCHIES</code> XML for Analysis
method.</p>

<p>The returned result set contains the following columns.</p>

<table summary="Columns returned from getHierarchies">
  <tbody>
    <tr>
      <th width="250">Column name</th>
      <th width="100">Type</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>CATALOG_NAME</td>
      <td>String</td>
      <td>The name of the catalog to which this hierarchy belongs. <code>null</code>
if the provider does not support catalogs.</td>
    </tr>
    <tr>
      <td>SCHEMA_NAME</td>
      <td>String</td>
      <td>Not supported</td>
    </tr>
    <tr>
      <td>CUBE_NAME</td>
      <td>String</td>
      <td>(Required) The name of the cube to which this hierarchy
belongs.</td>
    </tr>
    <tr>
      <td>DIMENSION_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the dimension to which this hierarchy
belongs. For providers that generate unique names by qualification,
each component of this name is delimited.</td>
    </tr>
    <tr>
      <td>HIERARCHY_NAME</td>
      <td>String</td>
      <td>The name of the hierarchy. Blank if there is only a single
hierarchy in the dimension. This will always have a value in Microsoft
SQL Server 2005 Analysis Services (SSAS).</td>
    </tr>
    <tr>
      <td>HIERARCHY_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the hierarchy.</td>
    </tr>
    <tr>
      <td>HIERARCHY_GUID</td>
      <td>String</td>
      <td>Not supported</td>
    </tr>
    <tr>
      <td>HIERARCHY_CAPTION</td>
      <td>String</td>
      <td>A label or a caption associated with the hierarchy. Used
primarily for display purposes. If a caption does not exist, <b>HIERARCHY_NAME</b>
is returned. If the dimension either does not contain a hierarchy or
has just one hierarchy, this column will contain the name of the
dimension.</td>
    </tr>
    <tr>
      <td>DIMENSION_TYPE</td>
      <td>int</td>
      <td>The type of the dimension. Valid values include the values of
the xmlaOrdinal attribute of .</td>
    </tr>
    <tr>
      <td>HIERARCHY_CARDINALITY</td>
      <td>int</td>
      <td>The number of members in the hierarchy.</td>
    </tr>
    <tr>
      <td>DEFAULT_MEMBER</td>
      <td>String</td>
      <td>The default member for this hierarchy. This is a unique name.
Every hierarchy must have a default member.</td>
    </tr>
    <tr>
      <td>ALL_MEMBER</td>
      <td>String</td>
      <td>The member at the highest level of the rollup.</td>
    </tr>
    <tr>
      <td>DESCRIPTION</td>
      <td>String</td>
      <td>A human-readable description of the hierarchy. <code>null</code>
if no description exists.</td>
    </tr>
    <tr>
      <td>STRUCTURE</td>
      <td>int</td>
      <td>The structure of the hierarchy. Valid values include the
following values:
      <ul>
        <li><b>MD_STRUCTURE_FULLYBALANCED</b> (<b>0</b>)</li>
        <li><b>MD_STRUCTURE_RAGGEDBALANCED</b> (<b>1</b>)</li>
        <li><b>MD_STRUCTURE_UNBALANCED</b> (<b>2</b>)</li>
        <li><b>MD_STRUCTURE_NETWORK</b> (<b>3</b>)</li>
      </ul>
      </td>
    </tr>
    <tr>
      <td>IS_VIRTUAL</td>
      <td>boolean</td>
      <td>Always returns <code>false</code>.</td>
    </tr>
    <tr>
      <td>IS_READWRITE</td>
      <td>boolean</td>
      <td>A Boolean that indicates whether the Write Back to dimension
column is enabled.
      <p>Returns <code>true</code> if the <b>Write Back to dimension</b>
column that represents this hierarchy is enabled.</p>
      </td>
    </tr>
    <tr>
      <td>DIMENSION_UNIQUE_SETTINGS</td>
      <td>int</td>
      <td>Always returns <b>MDDIMENSIONS_MEMBER_KEY_UNIQUE</b> (<b>1</b>).</td>
    </tr>
    <tr>
      <td>DIMENSION_MASTER_<br/>
UNIQUE_NAME</td>
      <td>String</td>
      <td>Always returns <code>null</code>.</td>
    </tr>
    <tr>
      <td>DIMENSION_IS_VISIBLE</td>
      <td>boolean</td>
      <td>Always returns <code>true</code>. If the dimension is not
visible, it will not appear in the schema rowset.</td>
    </tr>
    <tr>
      <td>HIERARCHY_ORDINAL</td>
      <td>int</td>
      <td>The ordinal number of the hierarchy across all hierarchies of
the cube.</td>
    </tr>
    <tr>
      <td>DIMENSION_IS_SHARED</td>
      <td>boolean</td>
      <td>Always returns <code>true</code>.</td>
    </tr>
    <tr>
      <td>HIERARCHY_IS_VISIBLE</td>
      <td>boolean</td>
      <td>A Boolean that indicates whether the hieararchy is visible.
      <p>Returns <code>true</code> if the hierarchy is visible;
otherwise, <code>false</code>.</p>
      </td>
    </tr>
    <tr>
      <td>HIERARCHY_ORIGIN</td>
      <td>int</td>
      <td>A bit mask that determines the source of the hierarchy:
      <ul>
        <li><b>MD_USER_DEFINED</b> identifies user defined hierarchies,
and has a value of <b> 0x0000001</b>.</li>
        <li><b>MD_SYSTEM_ENABLED</b> identifies attribute hierarchies,
and has a value of <b> 0x0000002</b>.</li>
        <li><b>MD_SYSTEM_INTERNAL</b> identifies attributes with no
attribute hierarchies, and has a value of<b> 0x0000004</b>.</li>
      </ul>
      <p>A parent/child attribute hierarchy is both <b> MD_USER_DEFINED</b>
and <b>MD_SYSTEM_ENABLED</b>.</p>
      </td>
    </tr>
    <tr>
      <td>HIERARCHY_DISPLAY_FOLDER</td>
      <td>String</td>
      <td>The path to be used when displaying the hierarchy in the user
interface. Folder names will be separated by a semicolon (;). Nested
folders are indicated by a backslash (\).</td>
    </tr>
    <tr>
      <td>INSTANCE_SELECTION</td>
      <td>int</td>
      <td>A hint to the client application on how to show the
hierarchy. Valid values include the following values:
      <ul>
        <li><b>MD_INSTANCE_SELECTION_NONE</b></li>
        <li><b>MD_INSTANCE_SELECTION_DROPDOWN</b></li>
        <li><b>MD_INSTANCE_SELECTION_LIST</b></li>
        <li><b>MD_INSTANCE_SELECTION_FILTEREDLIST</b></li>
        <li><b>MD_INSTANCE_SELECTION_MANDATORYFILTER</b></li>
      </ul>
      </td>
    </tr>
  </tbody>
</table>

<p>The rowset is sorted on <b>CATALOG_NAME</b>, <b> SCHEMA_NAME</b>, <b>CUBE_NAME</b>,
<b>DIMENSION_UNIQUE_NAME</b>, <b>HIERARCHY_NAME</b>.</p>

<h5>2.7.3.8. <a name="getLevels">getLevels</a></h5>

<p>Retrieves a result set describing each level within a particular
hierarchy.</p>

<p>Specified by the <code>MDSCHEMA_LEVELS</code> XML for Analysis
method.</p>

<p>The returned result set contains the following columns.</p>

<table summary="Columns returned from getLevels">

  <tbody>
    <tr>
      <th width="250">Column name</th>
      <th width="100">Type</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>CATALOG_NAME</td>
      <td>String</td>
      <td>The name of the catalog to which this level belongs. <code>null</code>
if the provider does not support catalogs.</td>
    </tr>
    <tr>
      <td>SCHEMA_NAME</td>
      <td>String</td>
      <td>The name of the schema to which this level belongs. <code>null</code>
if the provider does not support schemas.</td>
    </tr>
    <tr>
      <td>CUBE_NAME</td>
      <td>String</td>
      <td>The name of the cube to which this level belongs.</td>
    </tr>
    <tr>
      <td>DIMENSION_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the dimension to which this level belongs.
For providers that generate unique names by qualification, each
component of this name is delimited.</td>
    </tr>
    <tr>
      <td>HIERARCHY_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the hierarchy. If the level belongs to
more than one hierarchy, there is one row for each hierarchy to which
it belongs. For providers that generate unique names by qualification,
each component of this name is delimited.</td>
    </tr>
    <tr>
      <td>LEVEL_NAME</td>
      <td>String</td>
      <td>The name of the level.</td>
    </tr>
    <tr>
      <td>LEVEL_UNIQUE_NAME</td>
      <td>String</td>
      <td>The properly escaped unique name of the level.</td>
    </tr>
    <tr>
      <td>LEVEL_GUID</td>
      <td>String</td>
      <td>Not supported.</td>
    </tr>
    <tr>
      <td>LEVEL_CAPTION</td>
      <td>String</td>
      <td>A label or caption associated with the hierarchy. Used
primarily for display purposes. If a caption does not exist, <b>LEVEL_NAME</b>
is returned. </td>
    </tr>
    <tr>
      <td>LEVEL_NUMBER</td>
      <td>int</td>
      <td>The distance of the level from the root of the hierarchy.
Root level is zero (<b>0)</b>.</td>
    </tr>
    <tr>
      <td>LEVEL_CARDINALITY</td>
      <td>int</td>
      <td>The number of members in the level.</td>
    </tr>
    <tr>
      <td>LEVEL_TYPE</td>
      <td>int</td>
      <td>Type of the level. Values are as allowed by the <code>xmlaOrdinal</code>
field of the <a class="javadoc" href="api/org/olap4j/metadata/Level.Type.html">org.olap4j.Level.Type</a>
enum.</td>
    </tr>
    <tr>
      <td>DESCRIPTION</td>
      <td>String</td>
      <td>A human-readable description of the level. null if no
description exists.</td>
    </tr>
    <tr>
      <td>CUSTOM_ROLLUP_SETTINGS</td>
      <td>int</td>
      <td>A bitmap that specifies the custom rollup options:
      <ul>
        <li><b>MDLEVELS_CUSTOM_ROLLUP_EXPRESSION</b> (<b>0x01</b>)
indicates an expression exists for this level. (Deprecated)</li>
        <li><b>MDLEVELS_CUSTOM_ROLLUP_COLUMN</b> (<b>0x02</b>)
indicates that there is a custom rollup column for this level.</li>
        <li><b>MDLEVELS_SKIPPED_LEVELS</b> (<b>0x04</b>) indicates that
there is a skipped level associated with members of this level.</li>
        <li><b>MDLEVELS_CUSTOM_MEMBER_PROPERTIES</b> (<b>0x08</b>)
indicates that members of the level have custom member properties.</li>
        <li><b>MDLEVELS_UNARY_OPERATOR</b> (<b>0x10</b>) indicates that
members on the level have unary operators.</li>
      </ul>
      </td>
    </tr>
    <tr>
      <td>LEVEL_UNIQUE_SETTINGS</td>
      <td>int</td>
      <td>A bitmap that specifies which columns contain unique values,
if the level only has members with unique names or keys. The Msmd.h
file defines the following bit value constants for this bitmap:
      <ul>
        <li><b>MDDIMENSIONS_MEMBER_KEY_UNIQUE</b> (<b>1</b>)</li>
        <li><b>MDDIMENSIONS_MEMBER_NAME_UNIQUE</b> (<b>2</b>)</li>
      </ul>
      <p>The key is always unique in Microsoft SQL Server 2005 Analysis
Services (SSAS). The name will be unique if the setting on the
attribute is <b> UniqueInDimension</b> or <b>UniqueInAttribute</b></p>
      </td>
    </tr>
    <tr>
      <td>LEVEL_IS_VISIBLE</td>
      <td>boolean</td>
      <td>A Boolean that indicates whether the level is visible.
      <p>Always returns True. If the level is not visible, it will not
be included in the schema rowset.</p>
      </td>
    </tr>
    <tr>
      <td>LEVEL_ORDERING_PROPERTY</td>
      <td>String</td>
      <td>The ID of the attribute that the level is sorted on.</td>
    </tr>
    <tr>
      <td>LEVEL_DBTYPE</td>
      <td>int</td>
      <td>The <b>DBTYPE</b> enumeration of the member key column that
is used for the level attribute.
      <p>Null if concatenated keys are used as the member key column.</p>
      </td>
    </tr>
    <tr>
      <td>LEVEL_MASTER_<br/>
UNIQUE_NAME</td>
      <td>String</td>
      <td>Always returns null.</td>
    </tr>
    <tr>
      <td>LEVEL_NAME_<br/>
SQL_COLUMN_NAME</td>
      <td>String</td>
      <td>The SQL representation of the level member names.</td>
    </tr>
    <tr>
      <td>LEVEL_KEY_<br/>
SQL_COLUMN_NAME</td>
      <td>String</td>
      <td>The SQL representation of the level member key values.</td>
    </tr>
    <tr>
      <td>LEVEL_UNIQUE_NAME_<br/>
SQL_COLUMN_NAME</td>
      <td>String</td>
      <td>The SQL representation of the member unique names.</td>
    </tr>
    <tr>
      <td>LEVEL_ATTRIBUTE_<br/>
HIERARCHY_NAME</td>
      <td>String</td>
      <td>The name of the attribute hierarchy providing the source of
the level.</td>
    </tr>
    <tr>
      <td>LEVEL_KEY_CARDINALITY</td>
      <td>int</td>
      <td>The number of columns in the level key.</td>
    </tr>
    <tr>
      <td>LEVEL_ORIGIN</td>
      <td>int</td>
      <td>A bit map that defines how the level was sourced:
      <ul>
        <li><b>MD_ORIGIN_USER_DEFINED</b> identifies levels in a user
defined hierarchy.</li>
        <li><b>MD_ORIGIN_ATTRIBUTE</b> identifies levels in an
attribute hierarchy.</li>
        <li><b>MD_ORIGIN_KEY_ATTRIBUTE</b> identifies levels in a key
attribute hierarchy.</li>
        <li><b>MD_ORIGIN_INTERNAL</b> identifies levels in attribute
hierarchies that are not enabled.</li>
      </ul>
      </td>
    </tr>
  </tbody>
</table>

<p>The rowset is sorted on <b>CATALOG_NAME</b>, <b> SCHEMA_NAME</b>, <b>CUBE_NAME</b>,
<b>DIMENSION_UNIQUE_NAME</b>, <b>HIERARCHY_UNIQUE_NAME</b>, <b>LEVEL_NUMBER</b>.</p>

<h5>2.7.3.9. <a name="getMeasures">getMeasures</a></h5>

<p>Retrieves a result set describing each measure within a cube.</p>

<p>Specified by the <code>MDSCHEMA_MEASURES</code> XML for Analysis
method.</p>

<p>The returned result set contains the following columns.</p>

<table summary="Columns returned from getMeasures">

  <tbody>
    <tr>
      <th width="250">Column name</th>
      <th width="100">Type</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>CATALOG_NAME</td>
      <td>String</td>
      <td>The name of the catalog to which this measure belongs. <code>null</code>
if the provider does not support catalogs.</td>
    </tr>
    <tr>
      <td>SCHEMA_NAME</td>
      <td>String</td>
      <td>The name of the schema to which this measure belongs. <code>null</code>
if the provider does not support schemas.</td>
    </tr>
    <tr>
      <td>CUBE_NAME</td>
      <td>String</td>
      <td>The name of the cube to which this measure belongs.</td>
    </tr>
    <tr>
      <td>MEASURE_NAME</td>
      <td>String</td>
      <td>The name of the measure.</td>
    </tr>
    <tr>
      <td>MEASURE_UNIQUE_NAME</td>
      <td>String</td>
      <td>The Unique name of the measure. For providers that generate
unique names by qualification, each component of this name is delimited.</td>
    </tr>
    <tr>
      <td>MEASURE_CAPTION</td>
      <td>String</td>
      <td>A label or caption associated with the measure. Used
primarily for display purposes. If a caption does not exist, <b>MEASURE_NAME</b>
is returned.</td>
    </tr>
    <tr>
      <td>MEASURE_GUID</td>
      <td>String</td>
      <td>Not supported.</td>
    </tr>
    <tr>
      <td>MEASURE_AGGREGATOR</td>
      <td>int</td>
      <td>An enumeration that identifies how a measure was derived. Can
be one of the values allowed by the <code>xmlaOrdinal</code> field of
the <a class="javadoc" href="api/org/olap4j/metadata/Measure.Aggregator.html">org.olap4j.Measure.Aggregator</a>
enum.</td>
    </tr>
    <tr>
      <td>DATA_TYPE</td>
      <td>int</td>
      <td>The data type of the measure.</td>
    </tr>
    <tr>
      <td>NUMERIC_PRECISION</td>
      <td>int</td>
      <td>The maximum precision of the property if the measure object's
data type is exact numeric. <code>null</code> for all other property
types. </td>
    </tr>
    <tr>
      <td>NUMERIC_SCALE</td>
      <td>int</td>
      <td>The number of digits to the right of the decimal point if the
measure object's type indicator is <b> DBTYPE_NUMERIC</b> or <b>DBTYPE_DECIMAL</b>.
Otherwise, this value is <code>null</code>. </td>
    </tr>
    <tr>
      <td>MEASURE_UNITS</td>
      <td>String</td>
      <td>Not supported</td>
    </tr>
    <tr>
      <td>DESCRIPTION</td>
      <td>String</td>
      <td>A human-readable description of the measure. <b> null</b> if
no description exists.</td>
    </tr>
    <tr>
      <td>EXPRESSION</td>
      <td>String</td>
      <td>An expression for the member.</td>
    </tr>
    <tr>
      <td>MEASURE_IS_VISIBLE</td>
      <td>boolean</td>
      <td>A Boolean that always returns True. If the measure is not
visible, it will not be included in the schema rowset.</td>
    </tr>
    <tr>
      <td>LEVELS_LIST</td>
      <td>String</td>
      <td>A string that always returns <code>null</code>.</td>
    </tr>
    <tr>
      <td>MEASURE_NAME_<br/>
SQL_COLUMN_NAME</td>
      <td>String</td>
      <td>The name of the column in the SQL query that corresponds to
the measure's name.</td>
    </tr>
    <tr>
      <td>MEASURE_UNQUALIFIED_<br/>
CAPTION</td>
      <td>String</td>
      <td>The name of the measure, not qualified with the measure group
name.</td>
    </tr>
    <tr>
      <td>MEASUREGROUP_NAME</td>
      <td>String</td>
      <td>The name of the measure group to which the measure belongs.</td>
    </tr>
    <tr>
      <td>MEASURE_DISPLAY_FOLDER</td>
      <td>String</td>
      <td>The path to be used when displaying the measure in the user
interface. Folder names will be separated by a semicolon. Nested
folders are indicated by a backslash (\).</td>
    </tr>
    <tr>
      <td>DEFAULT_FORMAT_STRING</td>
      <td>String</td>
      <td>The default format string for the measure.</td>
    </tr>
  </tbody>
</table>

<p>The rowset is sorted on <b>CATALOG_NAME</b>, <b> SCHEMA_NAME</b>, <b>CUBE_NAME</b>,
<b>MEASURE_NAME</b>.</p>

<h5>2.7.3.10. <a name="getMembers">getMembers</a></h5>

<p>Retrieves a result set describing the members within a database.</p>

<p>Specified by the <code>MDSCHEMA_MEMBERS</code> XML for Analysis
method.</p>

<p>The returned result set contains the following columns.</p>

<table summary="Columns returned from getMembers">

  <tbody>
    <tr>
      <th width="250">Column name</th>
      <th width="100">Type</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>CATALOG_NAME</td>
      <td>String</td>
      <td>The name of the database to which this member belongs.</td>
    </tr>
    <tr>
      <td>SCHEMA_NAME</td>
      <td>String</td>
      <td>The name of the schema to which this member belongs.</td>
    </tr>
    <tr>
      <td>CUBE_NAME</td>
      <td>String</td>
      <td>The name of the cube to which this member belongs.</td>
    </tr>
    <tr>
      <td>DIMENSION_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the dimension to which this member belongs.</td>
    </tr>
    <tr>
      <td>HIERARCHY_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the hierarchy to which this member belongs.</td>
    </tr>
    <tr>
      <td>LEVEL_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the level to which this member belongs.</td>
    </tr>
    <tr>
      <td>LEVEL_NUMBER</td>
      <td>int</td>
      <td>The distance of the member from the root of the hierarchy.
The root level is zero (0).</td>
    </tr>
    <tr>
      <td>MEMBER_ORDINAL</td>
      <td>int</td>
      <td>(Deprecated) Always returns <b>0</b>. </td>
    </tr>
    <tr>
      <td>MEMBER_NAME</td>
      <td>String</td>
      <td>The name of the member.</td>
    </tr>
    <tr>
      <td>MEMBER_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the member.</td>
    </tr>
    <tr>
      <td>MEMBER_TYPE</td>
      <td>int</td>
      <td>The type of the member, one of the values of the <code>ordinal</code>
field of the <a class="javadoc" href="api/org/olap4j/metadata/Member.Type.html">org.olap4j.Member.Type</a>
enum.
      <p><b>FORMULA </b>takes precedence over <b>MEASURE</b>. For
example, if there is a formula (calculated) member on the Measures
dimension, it is listed as <b>FORMULA</b>. </p>
      </td>
    </tr>
    <tr>
      <td>MEMBER_GUID</td>
      <td>String</td>
      <td>The GUID of the member. <code>null</code> if no GUID exists.</td>
    </tr>
    <tr>
      <td>MEMBER_CAPTION</td>
      <td>String</td>
      <td>A label or caption associated with the member. Used primarily
for display purposes. If a caption does not exist, <b>MEMBER_NAME</b>
is returned.</td>
    </tr>
    <tr>
      <td>CHILDREN_CARDINALITY</td>
      <td>int</td>
      <td>The number of children that the member has. This can be an
estimate, so consumers should not rely on this to be the exact count.
Providers should return the best estimate possible.</td>
    </tr>
    <tr>
      <td>PARENT_LEVEL</td>
      <td>int</td>
      <td>The distance of the member's parent from the root level of
the hierarchy. The root level is zero (0).</td>
    </tr>
    <tr>
      <td>PARENT_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the member's parent. <code>null</code> is
returned for any members at the root level.</td>
    </tr>
    <tr>
      <td>PARENT_COUNT</td>
      <td>int</td>
      <td>The number of parents that this member has.</td>
    </tr>
    <tr>
      <td>DESCRIPTION</td>
      <td>String</td>
      <td>Always returns <code>null</code>.</td>
    </tr>
    <tr>
      <td>EXPRESSION</td>
      <td>String</td>
      <td>The expression for calculations, if the member is of type <b>MDMEMBER_TYPE_FORMULA</b>.</td>
    </tr>
    <tr>
      <td>MEMBER_KEY</td>
      <td>String</td>
      <td>The value of the member's key column. Returns <b> null</b>
if the member has a composite key.</td>
    </tr>
    <tr>
      <td>IS_PLACEHOLDERMEMBER</td>
      <td>boolean</td>
      <td>A Boolean that indicates whether a member is a placeholder
member for an empty position in a dimension hierarchy.
      <p>It is valid only if the <b> MDX Compatibility</b> property
has been set to 1. </p>
      </td>
    </tr>
    <tr>
      <td>IS_DATAMEMBER</td>
      <td>boolean</td>
      <td>A Boolean that indicates whether the member is a data member.
      <p>Returns True if the member is a data member.</p>
      </td>
    </tr>
    <tr>
      <td>Zero or more additional columns</td>
      <td>int</td>
      <td>No properties are returned if the members could be returned
from multiple levels. For example, if the Tree operator is <b>PARENT</b>
and <b>SELF</b> for a non-parent child hierarchy, no member properties
are returned.
      <p>This applies to ragged hierarchies where tree operators could
return members from different levels (for example, if the prior level
contains holes and parent on members is requested).</p>
      </td>
    </tr>
  </tbody>
</table>

<p>The rowset is sorted on <b>CATALOG_NAME</b>, <b> SCHEMA_NAME</b>, <b>CUBE_NAME</b>,
<b>DIMENSION_UNIQUE_NAME</b>, <b>HIERARCHY_UNIQUE_NAME</b>, <b>LEVEL_UNIQUE_NAME</b>,
<b> LEVEL_NUMBER</b>, <b>MEMBER_ORDINAL</b>.</p>

<h5>2.7.3.11. <a name="getProperties">getProperties</a></h5>

<p>Retrieves a list of descriptions of member and cell Properties.</p>

<p>Specified by the <code>MDSCHEMA_PROPERTIES</code> XML for Analysis
method.</p>

<p>The returned result set contains the following columns. </p>

<table summary="Columns returned from getProperties">

  <tbody>
    <tr>
      <th width="250">Column name</th>
      <th width="100">Type</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>CATALOG_NAME</td>
      <td>String</td>
      <td>The name of the database.</td>
    </tr>
    <tr>
      <td>SCHEMA_NAME</td>
      <td>String</td>
      <td>The name of the schema to which this property belongs. <code>null</code>
if the provider does not support schemas.</td>
    </tr>
    <tr>
      <td>CUBE_NAME</td>
      <td>String</td>
      <td>The name of the cube.</td>
    </tr>
    <tr>
      <td>DIMENSION_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the dimension. For providers that generate
unique names by qualification, each component of this name is
delimited. </td>
    </tr>
    <tr>
      <td>HIERARCHY_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the hierarchy. For providers that generate
unique names by qualification, each component of this name is
delimited. </td>
    </tr>
    <tr>
      <td>LEVEL_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the level to which this property belongs.
If the provider does not support named levels, it should return the <b>
DIMENSION_UNIQUE_NAME</b> value for this field. For providers that
generate unique names by qualification, each component of this name is
delimited. </td>
    </tr>
    <tr>
      <td>MEMBER_UNIQUE_NAME</td>
      <td>String</td>
      <td>The unique name of the member to which the property belongs.
Used for data stores that do not support named levels or have
properties on a member-by-member basis. If the property applies to all
members in a level, this column is <code>null</code>. For providers
that generate unique names by qualification, each component of this
name is delimited. </td>
    </tr>
    <tr>
      <td>PROPERTY_TYPE</td>
      <td>int</td>
      <td>A bitmap that specifies the type of the property:
      <ul>
        <li><b>MDPROP_MEMBER</b> (<b>1</b>) identifies a property of a
member. This property can be used in the DIMENSION PROPERTIES clause of
the SELECT statement.</li>
        <li><b>MDPROP_CELL</b> (<b>2</b>) identifies a property of a
cell. This property can be used in the CELL PROPERTIES clause that
occurs at the end of the SELECT statement. </li>
        <li><b>MDPROP_SYSTEM</b> (<b>4</b>) identifies an internal
property.</li>
        <li><b>MDPROP_BLOB</b> (<b>8</b>) identifies a property which
contains a binary large object (blob).</li>
      </ul>
      </td>
    </tr>
    <tr>
      <td>PROPERTY_NAME</td>
      <td>String</td>
      <td>The name of the property. If the key for the property is the
same as the name for the property, <b>PROPERTY_NAME</b> will be blank.</td>
    </tr>
    <tr>
      <td>PROPERTY_CAPTION</td>
      <td>String</td>
      <td>A label or caption associated with the property, used
primarily for display purposes. Returns <b> PROPERTY_NAME</b> if a
caption does not exist.</td>
    </tr>
    <tr>
      <td>DATA_TYPE</td>
      <td>int</td>
      <td>The data type of the property.</td>
    </tr>
    <tr>
      <td>CHARACTER_<br/>
MAXIMUM_LENGTH</td>
      <td>int</td>
      <td>The maximum possible length of the property, if it is a
character, binary, or bit type.
      <p>Zero indicates there is no defined maximum length.</p>
      <p>Returns <code>null</code> for all other data types.</p>
      </td>
    </tr>
    <tr>
      <td>CHARACTER_OCTET_LENGTH</td>
      <td>int</td>
      <td>The maximum possible length (in bytes) of the property, if it
is a character or binary type.
      <p>Zero indicates there is no defined maximum length.</p>
      <p>Returns <code>null</code> for all other data types.</p>
      </td>
    </tr>
    <tr>
      <td>NUMERIC_PRECISION</td>
      <td>int</td>
      <td>The maximum precision of the property, if it is a numeric
data type.
      <p>Returns <code>null</code> for all other data types.</p>
      </td>
    </tr>
    <tr>
      <td>NUMERIC_SCALE</td>
      <td>int</td>
      <td>The number of digits to the right of the decimal point, if it
is a <b>DBTYPE_NUMERIC</b> or <b> DBTYPE_DECIMAL</b> type.
      <p>Returns <code>null</code> for all other data types.</p>
      </td>
    </tr>
    <tr>
      <td>DESCRIPTION</td>
      <td>String</td>
      <td>A human readable description of the property. <code>null</code>
if no description exists.</td>
    </tr>
    <tr>
      <td>PROPERTY_CONTENT_TYPE</td>
      <td>int</td>
      <td>The type of the property. Can be one of the values of the <code>xmlaOrdinal</code>
field of the <a class="javadoc" href="api/org/olap4j/metadata/Property.ContentType.html">org.olap4j.Property.ContentType</a>
enum.</td>
    </tr>
    <tr>
      <td>SQL_COLUMN_NAME</td>
      <td>String</td>
      <td>The name of the property used in SQL queries from the cube
dimension or database dimension.</td>
    </tr>
    <tr>
      <td>LANGUAGE</td>
      <td>int</td>
      <td>The translation expressed as an <b>LCID</b>. Only valid for
property translations.</td>
    </tr>
    <tr>
      <td>PROPERTY_ORIGIN</td>
      <td>int</td>
      <td>Identifies the type of hierarchy that the property applies
to:
      <ul>
        <li><b>MD_USER_DEFINED</b> (<b>1</b>) indicates the property is
on a user defined hierarchy</li>
        <li><b>MD_SYSTEM_ENABLED</b> (<b>2</b>) indicates the property
is on an attribute hierarchy</li>
        <li><b>MD_SYSTEM_DISABLED</b> (<b>4</b>) indicates the property
is on an attribute hierarchy that is not enabled.</li>
      </ul>
      </td>
    </tr>
    <tr>
      <td>PROPERTY_ATTRIBUTE_<br/>
HIERARCHY_NAME</td>
      <td>String</td>
      <td>The name of the attribute hierarchy sourcing this property.</td>
    </tr>
    <tr>
      <td>PROPERTY_CARDINALITY</td>
      <td>String</td>
      <td>The cardinality of the property. Possible values include the
following strings:
      <ul>
        <li><b>ONE</b></li>
        <li><b>MANY</b></li>
      </ul>
      </td>
    </tr>
    <tr>
      <td>MIME_TYPE</td>
      <td>String</td>
      <td>The mime type for binary large objects (BLOBs).</td>
    </tr>
    <tr>
      <td>PROPERTY_IS_VISIBLE</td>
      <td>boolean</td>
      <td>A Boolean that indicates whether the property is visible.
      <p><code>true</code> if the property is visible; otherwise, <code>false</code>.</p>
      </td>
    </tr>
  </tbody>
</table>

<p>This schema rowset is not sorted.</p>

<h5>2.7.3.12. <a name="getSets">getSets</a></h5>

<p>Retrieves a result set describing any sets that are currently
defined in a
database, including session-scoped sets.</p>

<p>Specified by the <code>MDSCHEMA_SETS</code> XML for Analysis method.</p>

<p>The returned result set contains the following columns.</p>

<table summary="Columns returned from getSets">

  <tbody>
    <tr>
      <th width="250">Column name</th>
      <th width="100">Type</th>
      <th>Description</th>
    </tr>
    <tr>
      <td>CATALOG_NAME</td>
      <td>String</td>
      <td>The name of the database.</td>
    </tr>
    <tr>
      <td>SCHEMA_NAME</td>
      <td>String</td>
      <td>Not supported.</td>
    </tr>
    <tr>
      <td>CUBE_NAME</td>
      <td>String</td>
      <td>The name of the cube.</td>
    </tr>
    <tr>
      <td>SET_NAME</td>
      <td>String</td>
      <td>The name of the set, as specified in the <b> CREATE SET</b>
statement.</td>
    </tr>
    <tr>
      <td>SCOPE</td>
      <td>int</td>
      <td>The scope of the set:
      <ul>
        <li><b>MDSET_SCOPE_GLOBAL</b> (<b>1</b>)</li>
        <li><b>MDSET_SCOPE_SESSION</b> (<b>2</b>)</li>
      </ul>
      </td>
    </tr>
    <tr>
      <td>DESCRIPTION</td>
      <td>String</td>
      <td>Not supported.</td>
    </tr>
    <tr>
      <td>EXPRESSION</td>
      <td>String</td>
      <td>The expression for the set.</td>
    </tr>
    <tr>
      <td>DIMENSIONS</td>
      <td>String</td>
      <td>A comma delimited list of hierarchies included in the set.</td>
    </tr>
    <tr>
      <td>SET_CAPTION</td>
      <td>String</td>
      <td>A label or caption associated with the set. The label or
caption is used primarily for display purposes.</td>
    </tr>
    <tr>
      <td>SET_DISPLAY_FOLDER</td>
      <td>String</td>
      <td>The path to be used by the user interface when displaying the
set. Folder names are separated by a backslash (<b>\</b>), folders are
separated by a semicolon (<b>;</b>).</td>
    </tr>
  </tbody>
</table>

<p>The rowset is sorted on <b>CATALOG_NAME</b>, <b> SCHEMA_NAME</b>, <b>CUBE_NAME</b>.</p>

<h4>2.7.4. <a name="Other_methods">Other methods</a></h4>

<table summary="Other methods in class OlapDatabaseMetaData">

  <tbody>
    <tr>
      <th>Method</th>
      <th>Description</th>
    </tr>
    <tr>
      <td><code><a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getConnection%28%29">getConnection()</a></code></td>
      <td>Returns the connection (overrides DatabaseMetaData method).</td>
    </tr>
    <tr>
      <td><code> <a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html">getMdxKeywords()</a></code></td>
      <td>Returns the keywords of this dialect of MDX, as a
comma-separated string.</td>
    </tr><tr>
<td><code><a class="javadoc" href="api/org/olap4j/OlapDatabaseMetaData.html#getSupportedCellSetListenerGranularities%28%29">getSupportedCellSetListenerGranularities()</a></code></td><td>Returns the granularity of changes to cell sets that the database is capable of providing.</td></tr>

  </tbody>
</table>

<h3>2.8. <a name="Transform">Transform</a></h3>

<p><span style="font-weight: bold;">NOTE</span>: As of olap4j 1.0, this package is experimental and is subject to change in future releases.</p>

<p>A transform is an operation which maps a query model to a new query
model. It
is usually triggered by a gesture within the user-interface. For
example,
clicking on the <i>Unit Sales</i> column transforms the query</p>

<div class="code"> SELECT {[Measures].[Store Sales], [Measures].[Unit
Sales]} ON COLUMNS,<br/>
&nbsp; {[Product].Members} ON ROWS<br/>
FROM [Sales]
</div>

<p>into one with sorting:</p>

<div class="code"> SELECT {[Measures].[Store Sales], [Measures].[Unit
Sales]} ON COLUMNS,<br/>
&nbsp; Order({[Product].Members}, [Measures].[Unit Sales], ASC) ON ROWS<br/>
FROM [Sales]
</div>

<p>Transformations can only modify a query within a cube - it cannot be
used to
change the cube that the query is against or to join two cubes.
Similarly, the
transform package only supports modifying a MDX query model. For
example, a
"drill" transform can not be used to produce a SQL query that returns
data
outside of the cube.</p>

<p>Package name: <a class="javadoc" href="api/org/olap4j/transform/package-summary.html">org.olap4j.transform</a></p>

<p>Classes: (incomplete)</p>

<ul>
    <li>Tuple</li>
    <li>Set</li>
    <li>CalculatedMember</li>
    <li>NamedSet</li>
    <li>Axis</li>
    <li>Slicer</li>
</ul>

<h4>2.8.1. <a name="Query_Model_Details">Query Model Details</a></h4>

<p><b>This section should probably be moved into Section 2.4.</b></p>

<p>The MDX query language uses a data model based on cubes, dimensions, tuples
and sets.  The transformation package allows direct manipulation of a query
exploring a cube.</p>

<p>A tuple is a multidimensional member.  It is a combination of members from one
or more dimensions, with the limitation that only one member can be used from each
dimension.  A set is an ordered collection of tuples.  An MDX query selects
zero or more axes using a data slicer. (The axes loosely correspond to the "SELECT"
clause in a SQL query, and the slicer to the "WHERE".)
</p>

<h4>2.8.2. <a name="Navigation_Actions">Navigation Actions</a></h4>

<p>The defined set of navigations can be divided into four categories: Slicing,
Restructuring, Drilling, Scoping.</p>

<h5>2.8.2.1. <a name="Slicing_navigations">Slicing Navigations</a></h5>

<dl>
    <dt>setSlicer</dt><dd>Secifies the slicer to use, replacing any current one.</dd>
    <dt>getSlicer</dt><dd>Retrieve the current slicer.</dd>
    <dt>excludeEmpty</dt><dd>Removes empty slices from the results.</dd>
    <dt>setLimit</dt><dd>Limits the results to the top/bottom n results
    for a specified measure.</dd>
</dl>

<h5>2.8.2.2. <a name="Restructuring_navigations">Restructuring Navigations</a></h5>
<p>Restructuring navigations change the axes of the returned cube.</p>

<dl>
    <dt>getAxis</dt>
    <dt>setAxis</dt><dd>Specifies the Set to use for an Axis. Can be used to add or
    replace a axis.</dd>
    <dt>deleteAxis</dt><dd>Removes the specified Axis from the results.</dd>
    <dt>addToAxis</dt><dd>Appends a new Tuple or Set to an Axis.</dd>
    <dt>moveTuple</dt><dd>Moves a tuple from one Axis to another.  If the tuple
    is not contained in the first axis this method behaves like addToAxis on
    the second axis.</dd>
    <dt>reorderAxis</dt><dd>Reorders the tuples in the axis.</dd>
    <dt>addTotal</dt><dd>Adds an aggregation (total, min, max, count, distinct)
    to the specified member.  More than one aggregation can be added to a single
    member.</dd>
    <dt>deleteTotal</dt><dd>Deletes an aggregation from the specified member.</dd>
</dl>

<h5>2.8.2.3. <a name="Drilling_navigations">Drilling Navigations</a></h5>

<p>Navigations that allow a user to move through the levels in a hierarchy.  All
drill navigations operate on a single Axis.</p>

<dl>
    <dt>drill</dt><dd>Moves the specified member up/down one level in the
    hierarchy.  All members of the hierarchy are replaced by this action.</dd>
</dl>

<h5>2.8.2.4. <a name="Scoping_navigations">Scoping Navigations</a></h5>
<p>Navigations that allow a user to expand/collapse sections of a result set.
All scoping navigations operate on single Axis.</p>

<dl>
    <dt>expand</dt><dd>Expand the given measure to include both the current
    level and all the members one level down
    the hierarchy.  Optionally expands a single measure or all measures at the
    level.</dd>
    <dt>collapse</dt><dd>Removes members at a given level of a hierarchy.
    Optionally collapses a single measure or all measures at the level.</dd>
</dl>

<h5>2.8.2.5. <a name="Supporting_actions">Supporting Actions</a></h5>

<p>Axis Operations</p>
<ul>
    <li>getSet</li>
    <li>setSet</li>
    <li>addToAxis</li>
    <li>removeFromAxis</li>
</ul>

<p>Set Operations</p>
<ul>
    <li>getTuple</li>
    <li>setTuple</li>
    <li>addToSet - includes Tuples, ranges of Tuples, functions, properties</li>
    <li>removeFromSet</li>
</ul>

<p>Tuple Operations</p>
<ul>
    <li>addMember</li>
    <li>deleteMember</li>
    <li>getMembers</li>
</ul>

<h4><a name="Open_Nav_Issues">Open Issues</a></h4>
<ul>
    <li>Is this API at the right level, or is it too close to MDX?</li>
    <li>Do we want to include support for adding highlighting conditions?</li>
    <li>What about result formatting as part of the query?</li>
    <li>Should common operators such as CrossJoin(), Order() and Filter()
    be baked into the API as methods, or just treated as functions?</li>
    <li>How should we handle functions that return or modify Sets?  We want to
    make it easy to wrap an entire axis in a function.</li>
    <li>Should we limit the Slicer to a Tuple or allow a Set?  I believe the MDX
    spec allows a Set, but I don't know if anybody supports it.</li>
    <li>I think we should add some explicit time based functions, since time
    based analysis is so common, and so frequently done wrong.  ie if the Axis
    is using a time based dimension you can use "setCompareToPreviousTimePeriod()"
    instead of having to add the previous time period as a member and calculate
    the change.</li>
</ul>

<h3>2.9. <a name="Layout">Layout</a></h3>

<p><span style="font-weight: bold;">NOTE</span>: As of olap4j 1.0, this package
is experimental and is subject to change in future releases.</p>

<p>The layout package provides data models for graphical OLAP
applications. In
particular, the GridModel class provides, for OLAP data, what Swing's
<a class="javadoc" href="http://download.oracle.com/j2se/1.4.2/docs/api/javax/swing/table/TableModel.html">TableModel</a>
provides for SQL data.</p>

<p>Package name: <a class="javadoc" href="api/org/olap4j/layout/package-summary.html">org.olap4j.layout</a></p>

<p>Classes: TBD</p>

<h3>2.10. <a name="Scenarios"></a>Scenarios</h3>

<p><span style="font-weight: bold;">NOTE</span>: As of olap4j 1.0, this
functionality is experimental and is subject to change in future releases.</p>

<p>Scenarios allow an application to change values of cells. When the
value of a cell changes, values of related cells also change (parent
cells, child and descendant cells, and calculated cells).</p>

<p>Scenarios can therefore be used to perform 'what-if' analysis,
useful in budgeting or forecasting applications. This functionality is
commonly called 'write-back' (or sometimes 'writeback' or
'writethrough'; see for instance
<a href="http://en.wikipedia.org/wiki/Comparison_of_OLAP_Servers">the wikipedia
article "Comparison of OLAP Servers"</a>), but we avoid that term because this
specification does not stipulate that a provider implements scenarios by writing
the changed values to disk.</p>

<p>Each scenario has a different set of modifications. There is a base
scenario where the values are unchanged from the star schema; in this
scenario, cells cannot be modified.</p>

<p>A provider <span style="font-style: italic;">may</span> provide
a <code>[Scenario]</code> dimension for each cube for which scenarios are
enabled. This dimension contains a member for each scenario that is visible in
the current access-control context; the name of each member is the value
returned by the <code>getId()</code> method. The default member of the Scenario
dimension is the current scenario for the current connection (as set by
the <code>OlapConnection.setScenario()</code> method).</p>

<p>The Scenario dimension behaves in the way you would expect. For example, if a
query contains a slicer <code>WHERE [Scenario].[1]</code> then the cell values
returned by that query will reflect their values under that scenario. Also, you
can define cross-dimensional calculations, such as <code>WITH MEMBER [Gain] AS
([Time].[2011], [Scenario].[1] - [Scenario].[Default Scenario])</code>, to
compare values under two or more scenarios.</p>

<p>A particular provider <span style="font-style: italic;">may</span> provide a
means to save a scenario. (Say, to modify the fact table, or save the scenario
to disk in some other format.)</p>

<p>A particular provider <span style="font-style: italic;">may</span>
support access control to scenarios. (For example, a particular
scenario is invisible to role A, visible but read-only to role B, and
read-write to role C.)</p>

<p>Methods of the Scenario class:</p>
<ul>
  <li><code>String getId()</code> // returns the unique identifier of this scenario</li>
</ul>

<p>Other methods relating to scenarios:</p>
<ul>
  <li><code>Scenario OlapConnection.createScenario()</code> // creates a scenario</li>
  <li><code>void OlapConnection.setScenario(Scenario)</code> // sets the current scenario for this connection</li>
  <li><code>Scenario OlapConnection.getScenario()</code> // returns this connection's current scenario</li>
  <li><code>void Cell.setValue(Object value, AllocationPolicy allocationPolicy, Object... allocationArgs)</code> // sets the value of a cell</li>
</ul>

<h3>2.11. <a name="Notifications"></a>Notifications</h3>

<p><span style="font-weight: bold;">NOTE</span>: As of olap4j 1.0,
this functionality is experimental and is subject to change in future
releases.</p>

<p>The <code>CellSetListener</code> interface allows an application to
receive events when the contents of a CellSet have changed.</p>

<p>The client can ask the server to provide the listener with a
specific granularity of events, but the server can decline to provide
that granularity.</p>

<p>Fine granularity deals with changes such as cell values changing
(and reports the before and after value, before and after formatted
value), positions being deleted, positions being changed.</p>

<p>When an atomic change happens on the server (say a cache flush, if
the server is mondrian) then an event will arrive on the client
containing all of those changes. Although
<code>CellSetListener.CellSetChange.getCellChanges()</code> and
<code>CellSetListener.CellSetChange.getAxisChanges()</code> return lists, the
client should assume that all of the events in these lists occur
simultaneously.</p>

<p>At any point, the server is free to throw up its hands and say
'there are too many changes' by sending null values
for <code>getCellChanges</code> or <code>getAxisChanges</code>. This
prevents situations where there are huge numbers of changes that might
overwhelm the server, the network link, or the client, such as might
happen if a large axis is re-sorted.</p>

<p>The client should always be ready for that to happen (even for
providers that claim to provide fine granularity events), and should
re-execute the query to get the cell set. In fact, we recommend that
clients re-execute the query to get a new cellset whenever they get an
event. Then the client can use the details in the event to highlight
cells that have changed.</p>

<p>Methods on interface CellSetListener:</p>
<ul>
<li><code>cellSetChanged(CellSetChange)</code> // invoked when a cell set has changed</li>
<li><code>cellSetClosed(CellSet)</code> // invoked when a cell set is closed</li>
<li><code>cellSetOpened(CellSet)</code> // invoked when a cell set is opened</li>
</ul>

<p>Methods on interface CellSetChange:</p>
<ul>
<li><code>CellSet getCellSet()</code> // returns the cell set affected by this change</li>
<li><code>List&lt;CellChange&gt; getCellChanges()</code> // returns a list of cells that have changed, or null if the server cannot provide detailed changes</li>
<li><code>List&lt;AxisChange&gt; getAxisChanges()</code> // returns a list of axis changes, or null if the server cannot provide detailed changes</li>
</ul>

<p>Methods on interface AxisChange:</p>
<ul>
<li><code>CellSetAxis getAxis()</code> // returns the axis affected by this change</li>
<li><code>Position getBeforePosition()</code> // returns the position before the change; null if the change created a new position</li>
<li><code>Position getAfterPosition()</code> // returns the position after the change; null if the change deleted a new position</li>
</ul>

<p>Methods on interface CellChange:</p>
<ul>
<li><code>Cell getBeforeCell()</code> // returns the cell before the change</li>
<li><code>Cell getAfterCell()</code> // returns the cell after the change</li>
</ul>

<p>Other methods:</p>
<ul>
<li><code>OlapDatabaseMetaData.getSupportedCellSetListenerGranularities()</code> // returns the granularity of changes to cell sets that the database is capable of providing</li>
<li><code>OlapStatement.addListener(Granularity, CellSetListener)</code> // adds a listener to be notified of events to CellSets created by this statement</li>
</ul>

<h4>Notes for implementors</h4>

<p>The purpose of registering a listener before creating a cell set is
to ensure that no events "leak out" between creating a cell set and
registering a listener, or while a statement is being re-executed to
produce a new cell set.</p>

<p>The <code>cellSetOpened(CellSet)</code>
and <code>cellSetClosed(CellSet)</code> methods are provided so that
the listener knows what is going on when a statement is
re-executed. In particular, suppose a statement receives an change
event decides to re-execute. The listener is attached to the
statement, so receives notifications about both old and new cell
sets. The driver implicitls closes the previous cell set and calls
cellSetClosed, then calls <code>cellSetOpened</code> with the new cell set.</p>

<p>If changes are occurring regularly on the server, there will soon
be a call to
<code>cellSetChanged(CellSetChange)</code>. It
is important to note that this event contains only changes that have
occurred since the new cell set was opened.</p>

<p>The granularity parameter is provided to
<code>OlapStatement.addListener(Granularity, CellSetListener)</code>
for the server's benefit. If granularity is
only <code>Granularity.COARSE</code>, the server may be able to store
less information in order to track the cell set.</p>

<h3>2.12. <a name="Drill_through"></a>Drill through</h3>

<p>olap4j provides two ways of drilling through to get the collection of
atomic rows underlying a given cell.</p>

<ul>

<li>The <code>Cell.drillThrough()</code> method drills through a given
cell in the cell set returned by a previously executed statement.</li>

<li>Execute the <code>DRILLTHROUGH</code> MDX statement using
the <code>OlapStatement.executeStatement(String sql)</code>
method.</li>

</ul>

<p>The <code>DRILLTHROUGH</code> statement is a more powerful
approach, because it offers options <code>MAXROWS</code> to limit the
number of rows returned, and <code>RETURN</code> to choose which
attributes and measures are projected, but not all OLAP servers
implement it.</p>

<p>Note that we call the <code>ResultSet
Statement.executeStatement(String sql)</code> method,
not <code>CellSet OlapStatement.executeOlapStatement(String
mdx)</code>, because the result of drillthrough is relational (rows
and columns), not a dimensional (axes and cells). A statement can be
created by calling <code>OlapConnection.createStatement()</code>; even
though this returns an <code>OlapStatement</code>, the OlapStatement
is required to implement applicable methods of
its <code>Statement</code> base class.</p>

<h2>3. <a name="Other_topics">Other topics</a></h2>

<p>In this section we discuss aspects of the design and usage of olap4j which
pervade all of the components.</p>

<h3>3.1. <a name="Internationalization">Internationalization</a></h3>

<p>Metadata elements in olap4j can be localized. Unlike the tables and
columns model of relational databases and JDBC, elements of an OLAP
data model appear on the screen of the end-user, and the user expects
these elements to appear in his or her own language.</p>

<p>A connection has a locale. For most drivers, this can be initialized
using a connection parameter called <code>Locale</code>. The locale
can be overridden by calling <code>OlapConnection.setLocale(Locale)</code>.</p>

<p>Metadata elements Cube, Dimension, Hierarchy, Level, Member and so
forth have methods <code>getCaption</code> and <code>getDescription</code>
(inherited from
<a class="javadoc" href="api/org/olap4j/metadata/MetadataElement.html">MetadataElement</a>).
The values returned from these methods depend on the locale of the connection.</p>

<p>Suppose one cube is available in English and French, and in French
and Spanish, and both are shown in same portal. Clients typically say
that seeing reports in a mixture of languages is confusing; the portal
would figure out the best common language, in this case French. The
<a class="javadoc" href="api/org/olap4j/metadata/Cube.html">Cube</a>
and <a class="javadoc" href="api/org/olap4j/metadata/Schema.html">Schema</a>
objects have <code>getSupportedLocales()</code> methods for this purpose.</p>

<h3>3.2. <a name="Concurrency_and_thread-safety">Concurrency and
thread-safety</a></h3>

<p>The JDBC 4.0 specification describes the thread-safety requirements
for drivers, and what modes of concurrency JDBC applications can assume
that their drivers will support. Since the olap4j specification is an
extension to the JDBC specification, an olap4j driver must comply with
the JDBC specification in this regard.</p>

<h3>3.3. <a name="Canceling_statements">Canceling statements</a></h3>

<p>The JDBC specification provides the
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/Statement.html#cancel%28%29">Statement.cancel()</a>
method, so that a statement which is executing in one thread may be
safely terminated by another thread; and
<a class="javadoc" href="http://download.oracle.com/javase/6/docs/api/java/sql/Statement.html#setQueryTimeout%28int%29">Statement.setQueryTimeout(int
seconds)</a>, to request that a statement aborts itself after executing
for a certain period of time.</p>

<h2>4. <a name="Other_components">Other components</a></h2>

<p>The API described above is a set of interfaces which must be implemented by
any compliant provider. The olap4j project also contains some components which
are not part of the API.</p>

<h3>4.1. <a name="Test_suite">Test suite</a></h3>

<p>The olap4j project contains a TCK (Test Compatibility Kit). The TCK is a suite
of tests which can be used to verify the compliance of an implementation of the
API.</p>

<h3>4.2. <a name="XMLA_provider">XML/A provider</a></h3>

<p>The XML/A provider is an implementation of the olap4j API which talks to a
generic XML/A provider.</p>

<p>Since there are many XML/A providers, and some of them require requests in a
particular format and/or produce idiosyncratic responses, the XML/A provider
will come in several flavors.</p>

<p>The XML/A provider is being developed in the same source-code repository as
olap4j, in a Java package <code>org.olap4j.driver.xmla</code>, but is not part
of the olap4j specification or release.</p>

<h2>5. <a name="Non-functionality">Non-functionality</a></h2>

<p>Here are some of the areas of functionality which will <i>not</i> be part of
olap4j:</p>

<ul>
  <li>Schema reader parses an XML file to create a schema</li>
  <li>Cache management functions </li>
  <li>Ability to create/modify schema dynamically</li>
  <li>Definitions of MDX functions (such as the number and types of parameters)</li>
  <li>SPI to extend the system by creating user-defined functions and so forth</li>
  <li>XML/A bridge (to make an olap4j data source appear as an XML/A server)</li>
  <li>SchemaReader</li>
</ul>

<h2>6. <a name="Related_projects">Related projects</a></h2>

<h3>6.1. <a name="Mondrian_provider">Mondrian provider</a></h3>
<p>The Mondrian project contains an implementation of the olap4j
API based on
the Mondrian OLAP engine, namely the <a class="javadoc" href="http://mondrian.pentaho.com/api/mondrian/olap4j/MondrianOlap4jDriver.html">mondrian.olap4j.MondrianOlap4jDriver</a><a> driver. It is the reference implementation of olap4j.</a></p>

<h3>6.2. <a name="XMLA_provider_project">XML for Analysis provider</a></h3>

<p>We intend to create an a driver which implements the olap4j API on
top of any XML/A data source.</p>

<p>This code is currently being developed in the same source-code
repository as olap4j, but will be spun off as a separate project at some point.</p>

<h3>6.3. <a name="Other_data_sources">Other data sources</a></h3>

<p>In principle, providers could be created to other OLAP data
sources.  This would be particularly straightforward for servers which
already have a native Java API.</p>

<h3>6.4 <a name="xmla4js"></a>xmla4js</h3>

<p><a href="http://code.google.com/p/xmla4js/">xmla4js</a> is a JavaScript front-end to XML/A.</p>


<h2>Appendix A. <a name="Opportunities_for_specification">Opportunities
for specification</a></h2>

<p>The following are features which have been suggested for inclusion
in the
olap4j specification, but which are not part of the current version.
They may be
included in future revisions of the specification.</p>

<h3>A.1. Date and Time types</h3>

<p>Include support for Date and Time values. The package <code>org.olap4j.type</code>
could have additional classes DateType and TimeType.</p>

<p>(Richard Emberson, 2006/8/14)</p>

<h3>A.2. Schema notification</h3>

<p>Add a mechanism for the client to detect that the schema has been modified
(for instance, that a cube has been added). Not necessarily to find out what
those changes are.</p>

<p>(Richard Emberson, 2006/8/15)</p>

<h2>Appendix B. <a name="Feedback">Feedback</a></h2>

<h3>Richard Emberson, email, 2006/8/15</h3>

<p>"One thing we found about XMLA was that our users wanted all roles to be
defined, stored, modified, and accessed though the same mechanism. With a large
application with many areas that can be permissioned, it is important that
olap4j let an application builder manage roles externally and apply them as part
of an individual's execution context."</p>

<h2>Appendix C. <a name="Open_issues">Open issues</a></h2>

<p>These issues will be voted upon at the next meeting. If they are accepted,
they will generally be put into the spec.</p>

<p>(No issues are currently open.)</p>

<h2>Appendix D. <a name="Miscellaneous">Miscellaneous</a></h2>

<h3>D.1. To be specified</h3><p>[2006/10/20#3. Need to allow clients to access the members on a
ResultAxis via a list (for convenience) and via an iterator. Iterators
need to be restartable, but not bidirectional. Need to know the size of
the axes, even if using the iterator interface.]</p>

<p>[2006/10/20#6. We discussed session support. It is necessary for
write-back. JDBC's 'stateful session' is difficult to implement over a
stateless protocol like HTTP. Michael suggested adding 'session name'
as a parameter to 'execute' methods. Julian disagreed. No conclusion
reached.]</p>

<p>[2006/10/20#7. We discussed the goals and intended audience of
olap4j. The audience spans from a beginner's audience (only 2 hours
experience with the API) who don't want to write a lot of code, to
writers of clients (2 yrs experience with the API) who want performance
and don't care how much code they need to write. Distributed clients
(e.g. olap4j provider for XMLA) have bandwidth constraints. Mobile
clients also have memory constraints.</p>

<p>ADOMD addressed beginners audience well, but used a lot of memory.
Challenge is to support an object model (hence easy programming model)
without increasing memory. No specific change to the specification, but
decided to add memory efficiency as a design goal.]</p>

<h3>D.2. Design notes</h3>

<h4><a name="JDK">JDK</a></h4>

<p>We are targeting JDK 1.5, and running retroweaver for
backward compatibility for JDK 1.4. See forum thread:
<a href="http://sourceforge.net/forum/forum.php?thread_id=1560764&amp;forum_id=577988">
olap4j, JDK 1.5 and generics</a>.</p>
<p>We also support JDK 1.6, and with it JDBC 4.0. </p>

<h4>Result sets, random access, and memory usage</h4>

<p>Should result sets return their axes as cursors or collections? Cursors
require less memory, but collections provide an easier programming model.</p>

<p>Also on the subject of memory, how to represent the metadata? Schema result
sets require less memory, are more flexible, and have better defined semantics
in the presence of transactions and offline working; but an object model (Cube,
Dimension, Level) provides an easier programming model.</p>

<h4>Accessing cells</h4>

<p>It would be possible to access cells in a result set (a) by ordinal; (b) by
coordinates; (c) by the 'etchasketch' model determined by the position of the
iterator along each axis, as used by JOLAP. We decided to support (a) and (b)
but not (c). There are methods on CellSet to convert from ordinal to
coordinates and vice versa.</p>

<p>If there is a huge number of cells, the client has limited memory, and
bandwidth to the server is limited, random access to cells is costly. Michael
suggested that we add a method <code>List&lt;Cell&gt; getCells(int startOrdinal, int
endOrdinal)</code>, which matches XML/A behavior, but we declined to add it to the spec
for now. John drew the analogy of a modern file system, implementing a serial
access interface (streams) on top of random-access primitives. For now, we
support only random access, but suggest that the provider looks for patterns of
access.</p>

<h2>Appendix E. <a name="References">References</a></h2>

<p>1. <a name="XMLA">XMLA</a>: <a class="l" href="http://www.xmla.org/spec/1.1/xmla1.1.doc">XML for
Analysis Specification, version 1.1</a>.</p>

<h2>Appendix F. <a name="Change_log">Change log</a></h2>

<ul>
<li>Version 1.0.</li>
</ul>

<hr noshade="noshade">

</body></html>
